Phone : 00212625597419

How to Change or Reset SSH port

A. Change SSH port number:

Open sshd_config
pico /etc/ssh/sshd_config

#Port 22

Change to new port and remove #
Port 2950

Restart SSH:
service sshd restart

Don’t close your current SSH session
Start a new SSH session in a new widows with the new SSH port
If you are able to login using new SSH port number, you have successfully changed your server SSH port number.

You can verify if the configuration has been applied with the following command:
netstat -tulpn | grep sshd

B. Reset SSH port number:

Login in to WHM:

Add following url at the end of WHM url:

Final url will be:

Your server SSH port is now reset to default 22.

If its not working, you may need to restart SSH from
WHM >> Restart Services >> SSH Server

استضافة الناصح

Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read