Skip to content

Instantly share code, notes, and snippets.

@wileyj
Last active December 14, 2017 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wileyj/1584272806d87bafaa37b380172d4d71 to your computer and use it in GitHub Desktop.
Save wileyj/1584272806d87bafaa37b380172d4d71 to your computer and use it in GitHub Desktop.
sshd_config
Port 22
Protocol 2
PidFile /var/run/sshd.pid
LogLevel INFO
SyslogFacility AUTH
PermitEmptyPasswords no
PubKeyAuthentication yes
DSAAuthentication yes
IgnoreRhosts yes
LoginGraceTime 30
StrictModes yes
MaxAuthTries 10
PermitRootLogin no
GatewayPorts yes
TCPKeepAlive no
UsePam yes
ClientAliveInterval 0
ClientAliveCountMax 0
PermitTunnel yes
PasswordAuthentication no
ChallengeResponseAuthentication no
MaxStartups 20:30:60
X11Forwarding no
AllowTcpForwarding yes
UsePrivilegeSeparation yes
AllowAgentForwarding yes
MaxSessions 5
LoginGraceTime 15
UseDNS no
AuthorizedKeysFile .ssh/authorized_keys
PrintMotd no
PrintLastLog yes
#Banner /etc/motd
MACs hmac-sha1
Ciphers 3des-cbc,aes256-ctr,aes192-ctr,aes128-ctr,arcfour256
# 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
Match Group jailed
AuthorizedKeysFile /etc/ssh/authorized_keys/%u
ChrootDirectory /export/jail
AllowTCPForwarding yes
X11Forwarding no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment