OpenSource For You

SSH access on a different port

- —vijith, vijith.pa@gmail.com

To change the default SSH port, you need to edit the SSH configurat­ion file /ETC/SSH/SSHD_CONfiG Open the configurat­ion file in any text editor and search for the line as follows:

#port 22

Uncomment and replace 22 with the port number you’d like to run SSH on. In my case I am using Port No 2087.

Now, restart sshd by issuing the following command:

/etc/rc.d/init.d/sshd restart

To test the changes, you need to first check if the given port number is open or not. The following command will let you know if the new port is using this command:

netstat -ltn | grep 2087

In the output of the above command, the state should be LISTEN for Port No 2087.

Finally, test ssh on the new port as follows:

ssh USERN$ME@localhost -p 2087

 ??  ??

Newspapers in English

Newspapers from India