How to change standard port number of services?

By | January 26, 2011

Hey there!! We received our very first question from one of our reader from bangalore. Kishore, from Bangalore asks… Can I change the standard port numbers of services available in a linux machine? If yes, how?

Well, the answer is yes. Standard port number of any service can be changed. You can change it from the correspoding configuration file of the service. For instance, ssh has default port number 22 and you can change it here

/etc/ssh/sshd_config

Make sure to restart the service ( in our case its ssh ) after changing the port number.

/etc/init.d/ssh restart

You can check the changes by doing this…

netstat -tunap | grep “portnumber”

Typically, you should see the service running.

If you like this article, then please consider sharing it. Sharing really inspires us to do things much better!!

Leave a Reply

Your email address will not be published. Required fields are marked *