Hardening SSH on Debian

Open a terminal

Open file /etc/ssh/sshd_config

sudo nano /etc/ssh/sshd_config

Change the listen port

Port 65002

Deny root Login

PermitRootLogin no

Make sure that users with empty passwords are not allowed to login to the system

PermitEmptyPasswords no

Allow certain users to have access via ssh

AllowUsers user1 user2

Allow certain group members to have access via ssh

AllowGroups group1 group2

Disable Debian Banner Suffix

DebianBanner no

Save and exit nano.

Restart ssh service

sudo service ssh restart

It should be noted that there are more options in this file to make your SSH service more secure but in Debian there are already configured correctly by default.

Categories: Debian Tags: , , ,
%d bloggers like this: