Thursday, February 18, 2010

How to change SSH port.

Running a Linux server on default SSH port 22 is risky as there may be some brute force attack. So it is always good idea to change default SSH port. It is very simple to change ssh port as you just need to edit sshd_config and reload the new configuration and you're done with it. Please find below steps in achieving that.

Step 1:
Edit sshd_config normally placed at /etc/ssh/. Open it and there is variable "Port 22" so change it with new desired port as "Port 2222"

Step 2
You've with the configuration so you just need to reload sshd service so that changes can take effect. Use following command to achieve that.

root@localhost> service sshd reload

I hope you find this article helpful.

No comments:

Post a Comment