Hi guys, I recently upgraded from CentOS 5.5 to CentOS 6 and I have a little question, how to change the SSH port? I tried Google, all information I could find say edit ssh_config and sshd_config and change the port from 22 to any number you wish. However when I opened these two files, I saw: # port 22 Well this means the line is commented and does not work, right? So where I can change the port? I could not risk messing it up guys as I have no physical access to the server and SSH, so anyone could give me any advice that really works? Thanks
try this nano /etc/ssh/sshd_config and change this Port 22 then you have to restart , it wi works /etc/init.d/ssh restart
I love a fellow "nano" user. Working on server over the years, a lot of people are like what are you using for your text editor. Not very often to see someone that knows what it is. Listen to any nano user, they know what they are talking about We are generally old school server admins.