Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

Change the default port where ssh daemon listens

Date: 2011-04-25 00:00:00 -0400

Introduction

We’re one more time talking about security, this time it will about how to secure sshd a little bit more, and we will do it by changing the default port where sshd listens.

This way the attacker needs to guess your user (I’m sure you have disabled root access right?), your password, and now … yes, the port number where ssh daemon is listening.

Change the default ssh port

Edit the file /etc/ssh/sshd_config and search for the world Port it will say 22, change it to something like 4000 or better, 3756 :).

Then save the file, and restart the ssh service.

/etc/rc.d/sshd restart

or

/etc/init.d/ssh reload

And now you have a more secured server, another option you have is to have your server login only thru ssh public key

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.