Wednesday, December 28, 2011

How to change SSH port on Centos,Ubuntu,Debian

Keeping the default 22 SSH port is really not a good practice. I had seen many people do not bother about changing their SSH port even they configured many security features.
This article applies for Ubuntu/Debian/Centos/Redhat O/S





Note- Mess with others things on SSH config file is really harmful and it may lock your server from accessing via SSH. So you will need console access to reset SSH or contact server provider to do this. So do with your own risk!

Steps
Use NANO editor for edit files or vi editor. If you dont have NANO installed then you can use vi editor or you can install NANO by
apt-get install nano or yum install nano
1.You need to open SSHD config file using nano.
nano /etc/ssh/sshd_config
2.Thats your SSHD config file. On that there will be line called
Port 22

0 comments:

Post a Comment