Skip to content

Instantly share code, notes, and snippets.

@cmd64
Last active February 6, 2019 09:05
Show Gist options
  • Save cmd64/1b90f5d6e7c11fa89b430f1dfea314cf to your computer and use it in GitHub Desktop.
Save cmd64/1b90f5d6e7c11fa89b430f1dfea314cf to your computer and use it in GitHub Desktop.
Change the SSH Port for Your Linux Server
Connect to your server via SSH
Switch to the root user
Run the following command:
nano /etc/ssh/sshd_config
Locate the following line:
# Port 22
Remove # and change 22 to your desired port number.
Restart the sshd service by running the following command:
service sshd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment