Skip to content

Instantly share code, notes, and snippets.

@rohan-molloy
Last active August 3, 2018 14:01
Show Gist options
  • Save rohan-molloy/57bfac41735bfc5172bfbca4f9206852 to your computer and use it in GitHub Desktop.
Save rohan-molloy/57bfac41735bfc5172bfbca4f9206852 to your computer and use it in GitHub Desktop.
#
# Protocol options
#
Protocol 2
Port 22
AddressFamily inet
ListenAddress 0.0.0.0
#
# Host Keys
#
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#
# Crypto
#
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
#
# SSH Server privileges
#
UsePrivilegeSeparation sandbox
AllowTCPForwarding no
AllowStreamLocalForwarding no
X11Forwarding no
GatewayPorts no
PermitTunnel no
PermitTTY yes
#
# Logging options
#
SyslogFacility AUTH
LogLevel INFO
#
# Authentication Systems
#
PubkeyAuthentication yes
PasswordAuthentication no
HostbasedAuthentication no
RhostsRSAAuthentication no
ChallengeResponseAuthentication no
KerberosAuthentication no
GSSAPIAuthentication no
#
# Authentication options
#
PermitRootLogin yes
PermitEmptyPasswords no
LoginGraceTime 45s
StrictModes yes
#
# Other options
#
UseDNS no
IgnoreRhosts yes
TCPKeepAlive yes
ClientAliveInterval 120
ClientAliveCountMax 2
PrintMotd no
PrintLastLog yes
AcceptEnv LANG LC_*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment