HOw to Custom SSH Port in Linux Machine

Part of security measure, it is advisable to change default ports to your own defined ports.

SSH port is one among them that you need to customize. 🙂

Here is the detail on how you can customize your own ports for your own needs,

You should be able to define a custom port in /etc/ssh/sshd_config. Make sure your firewall is accepting connections thru that port. Might be a good idea to leave 22 open until you confirm that the non-standard port is working properly. As always make a backup of the original file before editing. Then restart SSH server.

To restart ssh service or server type

/etc/init.d/sshd restart

To start ssh

/etc/init.d/sshd start

To stop ssh

/etc/init.d/sshd stop
Hope you will find it useful.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s