@laks wrote:
Its a matter of two step process! First
Step 1) You need to have root (or sudo) permission to change/edit this file
/etc/ssh/sshd_configStep 2) As you know sshd default listens on port 22, so find the line
#Port 22and replace the port number to something else
#Port 12345That's it . right ?
Now login to your server with above port
ssh -p 12345 user@serveripYou must get an error message like
ssh: connect to host serverip port 12345: Connection refusedWhy it didn't work ?
There are two mistakes we did while changing
/etc/ssh/sshd_config
file.Mistake 1) We forgot to un-comment the line
#Port 12345Every line beginning with
#
will be treated as comment. So you mustun-comment
that line first
Port 12345Mistake 2) We didn't restart the sshd service. You must
restart
the sshd server to ensure these new changes are applied.
service sshd restartAnd now login to your server with above port
ssh -p 12345 user@serveripIt should prompt you for password..
Posts: 1
Participants: 1