change the default port that OpenSSH server uses

OpenSSH by default listens to port 22 of all local addresses. To provide additional
security to the OpenSSH server, the ListenAdress and Port
directives in /etc/ssh/sshd_config file can be used.

ListenAddress – List the ip address or hosts that sshd will listen on.

Port – Specifies the port that sshd will listen to.

Example /etc/ssh/sshd_config file:

Port 40
ListenAddress 127.0.0.1
ListenAddress 172.16.45.0

Restart sshd daemon in the OpenSSH server for the changes to take effect.

service sshd restart

Now the command below can be used to connect a client from serverip network to the OpenSSH server:

ssh serverip -p 40
Previous
Previous

You should rebuild using libgmp >= 5 to avoid timing attack vulnerability

Next
Next

X11 forwarding request failed on channel 0