Created
July 22, 2015 02:47
-
-
Save dnozay/d3b3515bf560555fef3d to your computer and use it in GitHub Desktop.
public-key only sshd config.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/ssh/sshd_config | |
# Everything is going to be public-key based. | |
# And we want to lock down the system from unauthorized access. | |
# Use only protocol 2 | |
Protocol 2 | |
# Using public-key, one try is enough. Must present the correct key. | |
MaxAuthTries 1 | |
# Prevent unsecure NFS home directory non-sense. | |
AuthorizedKeysFile /etc/ssh/keys/%u/authorized_keys | |
# Log public key fingerprint | |
LogLevel VERBOSE | |
SyslogFacility AUTHPRIV | |
# Public-key only. | |
PasswordAuthentication no | |
ChallengeResponseAuthentication no | |
# Allow pam_ldap users. | |
# UsePAM yes | |
# Accept locale-related environment variables | |
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES | |
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT | |
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE | |
AcceptEnv XMODIFIERS | |
X11Forwarding yes | |
# override default of no subsystems | |
Subsystem sftp /usr/libexec/openssh/sftp-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment