On 3/31/20 6:09 PM, Ralph Seichter wrote:
* Arjan van de Ven:
the "man stateless" manual page tries
to explain this and lists a set
of common things... it's quite useful to get the idea of things at
least
I used that manual page as a reference, but unfortunately it contains a
mistake concerning sshd configuration.
Creating /etc/ssh/sshd_config and adding a "Port" entry, as is the usual
method and recommended on the manual page, does not work with the
current Clear Linux version.
Instead, one needs to override /usr/lib/systemd/system/sshd.socket by
creating /etc/systemd/system/sshd.socket and changing ListenStream
there. My thanks to Robert Nesius for pointing that method out to me.
Ralph,
`man stateless` contains the following *exact* text since before March 2017:
```
To modify the listening port of sshd, one needs to determine
whether sshd.socket or sshd.service is enabled first, since
the methods for changing the port number depend on whether
sshd(8) is controlling the port number, or whether systemd(1)
is:
systemctl is-enabled sshd.socket
If enabled, the sshd.socket unit should be edited to modify the
port:
systemctl edit --full sshd.socket
And, the user should modify the port number at ListenStream= to
the desired new port number.
If sshd.service is enabled, the user should create, and edit a
new /etc/ssh/sshd_config file:
mkdir -p /etc/ssh/ vi /etc/ssh/sshd_config
And add a line in that file that reads:
Port 10022
to, for instance, change the port number sshd.service will
listen on to port 10022.
```
If you still do see a problem, please open a github issue here:
https://github.com/clearlinux/clr-man-pages/issues
Auke