How do I change my SSH port? Print

  • 2

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

  4. Click on Create Session

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

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


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


Was this answer helpful?

« Back


Ethernet Servers Ltd
124 City Road
London
EC1V 2NX


Registered Limited Company: #09114946
Telephone: +44 330 043 1258
Email: [email protected]

Copyright © 2013 - 2022 - Ethernet Servers Ltd - All Rights Reserved.

Proudly serving customers in 118 countries since September 2013!