Disable Root SSH Login

Harden SSH by preventing direct root logins.

Prevents SSH from accepting direct root logins by setting PermitRootLogin to no. Forces all access through named users with sudo, creating a clear audit trail.

When you need this: As a hardening step after creating a sudo user - always do this before the server goes live.

Command


        
2 views 0 copies
Log in to rate
Log in to save

Free account — save snippets into your own collections.