#Tips - Change default SSH port on CentOS 7
Changing default ssh port is important for your server, someone can use Brute-force attack to login to your server. Here's the steps on CentOS 7 :
- Connect to your server by using SSH
- You can use vi /etc/ssh/sshd_config command to edit the configuration file
- Find #Port 22 on the configuration
- Remove # (it's for comment) and change the port, for the example you can change into Port 22222 (I'm not suggesting you to use this port, change by your own)
- Restart SSH service by typing service ssh restart
- To test it you can exit on remote session
- Try to login with old port (22). Voila, now you can't access your sever using port 22
- Now you can remote your server by using new port
Post a Comment