Wednesday, November 12, 2008

Secure you ssh sessions!!!!

So when you scan you Linux box you see that ssh v1 is allowed and you read that it has some security flaws and you should disable it. Well that is correct not only should you disable that you should also disable sshing in to the box as root. So now all you need to know is how to do it.

All you have to do is modify 2 lines in your sshd_config file. Which is found in /etc/ssh/. When you open up the file in vi or your fav. editor you will see (with some searching) the following 2 entries

#Protocol 2,1
#PermitRootLogin yes

You will need to change these to lines to look as below.

Protocol 2

PermitRootLogin no

Then save the file and restart the ssh service

service sshd restart

There you go now you are a little more secure than you were this morning when you woke up :)

As a side note you should also make sure that your version of ssh is updated to the latest most secure version.

No comments: