Document how to change OpenSSH default port.

This commit documents how to change the OpenSSH port on Clear Linux*.

Clear Linux* enables an `sshd.socket` systemd unit, which listens in
port 22 by default.

This commit fixes #261

Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
This commit is contained in:
Simental Magana, Marcos
2018-10-08 10:49:41 -05:00
parent 181d91b6f7
commit 19c6f692b6
@@ -8,6 +8,46 @@ Remote users require a SSH service to be able to use an encrypted login
shell. The first time OpenSSH starts, it generates the server SSH keys needed
for the service.
|CL| enables the `sshd.socket` unit, which will listen on port 22 by default and
start the openssh service as required.
Change Default Port
===================
In order to change the default listen port for the OpenSSH\* service, perform
the following steps:
#. Edit the sshd.socket unit file, provide the `ListenStream` option in the
`[Socket]` section with no value in order to remove the |CL| default port
value, then provide the `ListenStream` option again with the new default
port to listen. In this example, we change `ListenStream` to
listen on port 4200 instead of the |CL| default:
.. code-block:: console
# systemctl edit sshd.socket
#. Verify your changes:
.. code-block:: console
# cat /etc/systemd/system/sshd.socket.d/override.conf
[Socket]
ListenStream=
ListenStream=4200
#. Reload the systemd daemon configurations:
.. code-block:: console
# systemctl daemon-reload
#. Restart the sshd.socket unit:
.. code-block:: console
# systemctl restart sshd.socket
SFTP
====