To Change the SSH Port for Your Linux Server
- Connect to your server via SSH
- Switch to the root user
- Run the following command:vi /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: servicesshd restart
What’s your Reaction?
+1
+1
+1
+1
+1
+1
+1