PetroSky Documentation
  • PetroSky - Docs
  • Getting Started
    • Basics
      • What is a VPS?
      • Operating Systems
      • Connecting to a VPS
    • Utilities
      • Backups
      • Snapshots
      • Reinstall
      • Password Reset
      • noVNC
    • Tutorials
      • Changing SSH Port
      • noVNC - Disabling Firewall
      • Installing Essentials
      • Installing LAMP
      • Installing OpenJDK 11
      • Installing NodeJS 12
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. Tutorials

Changing SSH Port

Secure Shell Port - Tutorials

PreviousTutorialsNextnoVNC - Disabling Firewall

Last updated 3 years ago

Was this helpful?

Changing Secure Shell Default Port (22)

The default port number is (22/TCP). You can set the port number of the server according to your requirements. Here is a detailed tutorial on how to do it.

Step 1:

First of all, you will have to open the SSH configuration file to change the port, thus, execute the following command in the terminal: nano /etc/ssh/sshd_config

Here at my case. I've used Port 3468. You can change 22 to whatever Port you want.

Step 2:

Save the changes with the following keys (CTRL+X) then hit 'Y' on your keyboard then 'Enter'. Now the changes are applied.

Step 3:

Restart SSH with the following command:

service sshd restart

From now on. You will be able to login with your custom SSH Port!