imthenachoman / How-To-Secure-A-Linux-Server

An evolving how-to guide for securing a Linux server.
Creative Commons Attribution Share Alike 4.0 International
17.25k stars 1.1k forks source link

How to find any duplicate parameter in /etc/ssh/sshd_config #38

Closed than0s closed 3 years ago

than0s commented 5 years ago

On step 2 of Secure /etc/ssh/sshd_config, a quick and dirty way to find any duplicate parameter is with:

awk '{print $1}' /etc/ssh/sshd_config | sort | uniq -c | grep -v ' 1 '

imthenachoman commented 5 years ago

Nice! I will add this when I get a chance. A little caught up with a new job. Thanks!

imthenachoman commented 3 years ago

Adding this. Thanks!