Casbay Knowledge Base

Search our articles or browse by category below

HOW TO: Change SSH Port

Last modified: October 1, 2022
Estimated reading time: 1 min

HOW TO: Change SSH Port

To change the SSH Port, please follow the full instructions below:

Firstly, open the file /etc/ssh/sshd_config with your favourite text editor. For example:

nano /etc/ssh/sshd_config

Then, find the string which defines the port and edit it:

# What ports, IPs and protocols we listen for
Port 22

Now restart sshd service:

service sshd restart

Make sure you have a new ssh port opened in your firewall.

Still having issue to change it? Do contact our Support Team .

What is SSH?

SSH or Secure Shell is a network communication protocol. SSH enables two computers to communicate (c.f http or hypertext transfer protocol. The protocol is able to transfer hypertext such as web pages) and share data. An inherent feature of ssh is that the communication between the two computers is encrypted. This means that it is suitable for use on insecure networks.

Do you know? SSH is often used to “login” and perform operations on remote computers. It may also be used for transferring data.

How To Use It?

You use a program on your computer (ssh client), to connect to our service (server). Besides, the program allows you to transfer the data to/from our storage using either a graphical user interface or command line. There are many programs available that enable you to perform this transfer and some operating systems such as Mac OS X and Linux. These OS have this capability built in.

Furthermore, SH clients will typically support SCP (Secure Copy) and/or SFTP (SSH File Transfer Protocol) for transferring data. We tend to recommend using SFTP instead of SCP but both will work with our service.

Was this article helpful?
Dislike 0
Previous: What is my VPS or Dedicated Server SSH port?
Next: HOW TO: Securely Transfer Files via rsync and SSH on Linux