HostOnNet Blog

How to Change the SSH port on cPanel Servers

Looking for Linux Server Admin or WordPress Expert? We can help.

To change the SSH port login as root, and edit

/etc/ssh/sshd_config

Find the line that says Port 22 and change 22 to any number between 1024->65535 (above 30000 is best) and save the file.

Once done, run:

/etc/init.d/sshd restart

Now start a new SSH session (don’t close your existing one), to make sure that you can get in.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.