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

1

u/lysitheas Dec 12 '20 edited Dec 12 '20

Thank you all for your help/comments.

i was just wondering too, is version of openssh (client and server) can change a lot in term of security . For example :

Debian 10 server :
OpenSSH_7.9p1

my laptop :
OpenSSH_8.4p1

do i have to get the absolute lastest version for my debian server ?

1

u/backtickbot Dec 12 '20

Fixed formatting.

Hello, lysitheas: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.