Home VestaCP How To Change VestaCP SSH Port

How To Change VestaCP SSH Port

By default, SSH port is set to 22. However this SSH port digit is not really safe or secure because who doesn’t know it? So everyone can make guess trying to login to your SSH such as using Bruteforce SSH login.

Because of that, we surely need to elevate our SSH security, we need to change our SSH Port so only we know it. So to change SSH port, you can follow the instructions below:

  1. Login to your SSH via PuTTY, then enter your IP address on the Host Name column (or IP Address), then click the Open button.
  2. To login, just type root as username then enter your password by right clicking then paste it and hit Enter.
    Change PuTTY Port 22
  3. The following is the interface of your SSH if you have successfully logged in. You can see the notification if there is fail login as many as 12713 since you last logged in.
    Login To PuTTY With New Port VestaCP Control Panel
  4. Now we change the SSH port digit so it will no longer use 22. The steps to do is by executing the command to change the 22 to be 65001, so copy the following code then paste it on PuTTY.
    sed -i 's/#Port 22/Port 65001/' /etc/ssh/sshd_config
  5. Now you need to restart you SSH service by copying and pasting the following command on PuTTY and then hit Enter.
    systemctl restart sshd

    Or use the following command:

    service sshd restart
  6. Once done, from now on and forward you can use the 65001 port.
    Login To PuTTY New Port VestaCP
  7. Now to test whether your changes have been applied, then try to re-login via PuTTY using the new port.
    Login To PuTTY With New Port
  8. The following is the SSH login appearance via PuTTY using the new port.
    Successfully Login To PuTTY With New Port

For more VestaCP tutorials you can find on that dedicated page.

LEAVE A REPLY

Please enter your comment!
Please enter your name here