1

Need to change the SSH default port number

Need to change the ssh Default port number to another port number what is the way to change the port number for ssh?

SSHD Add a comment
andrew
asked May 29 2019
edited May 29 2019

Answer

1

Connect to the server and switch to root user Run the following command #vim /etc/ssh/sshd_conf

And Search the following Line

#port 22

Remove (#) and replace the port number

And finally, restart the service

#systemctl restart sshd

Add a comment
linuxhelp
asked May 29 2019
Post your Answer