How do I change my SSH port?

In this tutorial, we will demonstrate how to change your SSH port using the Serial Console in our portal.

  1. Visit Services

  2. Click on your VPS from the list of Services

  3. Click on HTML 5 Serial Console (screenshot)

  4. Click on Create Session (screenshot)

  5. Type the following, and press ENTER: sed -i 's/8145/22/' /etc/ssh/sshd_config (screenshot)
    This will change your SSH port from 8145 to 22

  6. Type the following, and press ENTER: service sshd restart (screenshot)
    This will restart the OpenSSH service


You should now be able to access your server on port 22

Was this answer helpful? 1 Users Found This Useful (2 Votes)