Changing the SSH Port for Your Linux Server

You can change the default SSH port for your Linux server as an added security measure.

To Change the SSH Port for Your Linux Server
1) Connect to your server via SSH (Using Putty in Windows or Terminal in Linux)

2) Switch to the root user with su -

3) Use any text editor such as nano or vim or vi
ie: vi /etc/ssh/sshd_config

4) Locate the following line:
# Port 22

5) Remove # and change 22 to your desired port number.

6) Make sure you save the file sshd_config and exit the editor

7) Restart the sshd service by running the following command:
service sshd restart


Note: Make sure the new SSH port does not conflict with any known or blocked ports

- CSpace Hostings https://cspacehostings.com
  • ssh, port change, changing ports
  • 4 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

How do I reboot my VPS server?

Hi,You can reboot your VPS by passing the following command in Putty or Terminalreboot

How do I enable PPP?

You Can Login to SolusVM Panel -> Enable PPP.Please be sure to raise a Support Ticket...

Changing VPS Timezone?

Generic procedure to change timezone under Linux Cd to /etc, run:# cd /etcCreate a symlink...

How do I enable Tun/Tap?

You Can Login to SolusVM Panel -> Enable Tun/Tap.Please be sure to raise a Support Ticket...

How to Reinstall Cloud VPS Operating System?

You can reinstall OS in few clicks. 1) Login on SolusVM Cloud VPS Panel 2) Click Manage in...

Powered by WHMCompleteSolution