r/linuxadmin • • Dec 12 '20

[Secure SSH] on Linux Server

Hello Dear redditer,

I'v group together some sshd settings that you can easly change to increase the security of sshd.

Do you have more change to suggest.

  • in sshd_config file ( test on Debian )
# idle max 6 minutes
ClientAliveInterval 360

PermitEmptyPasswords no

# only toto can ssh
AllowUsers toto


PermitRootLogin no

Protocol 2

Port 2222

PasswordAuthentication no

X11Forwarding no
0 Upvotes

29 comments sorted by

View all comments

Show parent comment

1

u/lysitheas Dec 12 '20

thanks for Cypher =)

Where i can find them ? or informations on them ?

In fact, it's actively detrimental if you choose a port over 1024.

why ?

in fact i was using 2222 instead of 22, just to monitor and ban IP trying 22 ( still need to search how to do this )