/etc/ssh/sshd_config
Overview of /etc/ssh/sshd_config
/etc/ssh/sshd_configPurpose
Key Configuration Directives
Port 22Protocol 2HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_ed25519_key# Enable public key authentication PubkeyAuthentication yes # Disable password authentication PasswordAuthentication no # Allow root login with password PermitRootLogin yes# Log level (INFO, VERBOSE, DEBUG, etc.) LogLevel INFO # Log SSH daemon activities SyslogFacility AUTH# Allow users from specific groups AllowGroups sshusers # Deny users from specific groups DenyGroups root # Allow specific users AllowUsers user1 user2 # Deny specific users DenyUsers user3
Example sshd_config
sshd_configApplying Changes
Security Considerations
Conclusion
Last updated