3 Ways to Secure SSH Server

Valic —  October 7, 2011 — Leave a comment

For Debian Squeeze configuration file is located in /etc/ssh/sshd_config and at the  end of all the changes that will need to restart the server.

1. First step to one more secured ssh server is:

Change the standard port for ssh server

The first  safety rule is to change the default port because the majority of automated tools to perform brute force or dictionary attacks right at this port.

In the sshd_config file change the port directive to anoter port. I recomend to use a port above 1024.

Port 22

Will become:

Port 22222 or some other port

2. The second change is:

Disable root access

To disable direct root connection set the following option:

PermitRootLogin no

3. And the las change will be:

Allow only some users or groups to connect to server

For  only a few users can use the directive:

AllowUsers your-username

For groups use the following:

AllowGroups users



Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

No Comments

Be the first to start the conversation.

Leave a Reply