• Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
  • Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
Home/Article/Linux/How to change default SSH Port of VPS

How to change default SSH Port of VPS

Written by VernalWeb
July 31, 2017

As security has become the most important concern over Internet, you need to ensure best practices while managing your server. Well, changing the Default SSH Port to a different one is a part of Server Administration Best Practices. Here we’ve discussed how can one change default SSH Port of Linux VPS.

Change default SSH Port of Linux VPS

STEP 1: Login to your Cloud or VPS SSH using PuTTy

STEP 2: Once you’re logged in use the following command to navigate to SSH

cd /etc/ssh

STEP 3: Type the following command to open sshd_config file on VI Editor

vi sshd_config

STEP 4: Hit on ‘Insert’ on your keyboard to become able to edit the file

STEP 5: Search for Port 22. Change the port number according to your desired one. Remove ‘#’ from the starting of the line. Preserve the port number for further use.

STEP 6: Press ‘Exc’ on your keyboard. Then type

:wq

and hit enter. You’ve successfully edited sshd_config file

STEP 7: Now restart the service by using the following command

service sshd restart

All done! Your desired Port number now has been set for your Cloud or VPS.


We hope this tutorial helps you find the perfect solution. If your like our tutorials, definitely you’ll love our support. All VernalWeb hosting plans include 24/7 support from our amazing inhouse support staff. Check out our web hosting plans and have your website migrated today!

Tags:SSH

Was this helpful?

Yes  No
Related Articles
  • How do I order Extra IPs For My VPS/Dedicated?
  • How to Use KVM with the Intel Core i5 4570
  • How to Change the Default SSH Port (Linux / Ubuntu / Debian)
  • How to Change the Default SSH Port (Linux / CentOS)
  • Automating FTP Backups in Linux
  • How to whitelist an IP Address in ConfigServer Firewall (CSF)

Didn't find your answer? Submit Ticket

Latest Articles

  • How to show Hidden Files (.htaccess) in cPanel File Manager
  • Setup a Domain Redirection in cPanel
  • Create a MySQL Database and a User from cPanel
  • Remove page extensions using .htaccess
  • Cron Job Usage & Policy
  • © 2014 - 2025 VernalWeb. All rights reserved.