Header Ads

#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 :
  1. Connect to your server by using SSH
  2. You can use vi /etc/ssh/sshd_config command to edit the configuration file
  3. Find #Port 22 on the configuration
  4. 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)
  5. Restart SSH service by typing service ssh restart
  6. To test it you can exit on remote session
  7. Try to login with old port (22). Voila, now you can't access your sever using port 22 
  8.  Now you can remote your server by using new port

No comments

soyjoy23. Powered by Blogger.