Last active
February 6, 2019 09:05
-
-
Save cmd64/1b90f5d6e7c11fa89b430f1dfea314cf to your computer and use it in GitHub Desktop.
Change the SSH Port for Your Linux Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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