Skip to content

Instantly share code, notes, and snippets.

@metahertz
Created January 26, 2020 16:01
Show Gist options
  • Save metahertz/98bf496b3041664a16a9f7a5f3cbce0e to your computer and use it in GitHub Desktop.
Save metahertz/98bf496b3041664a16a9f7a5f3cbce0e to your computer and use it in GitHub Desktop.
# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
Port 22
ListenAddress 0.0.0.0
#ListenAddress ::
# Ciphers and keying
#RekeyLimit default none
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
PasswordAuthentication no
PubkeyAuthentication no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Kerberos options
KerberosAuthentication no
# GSSAPI options
GSSAPIAuthentication no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server
Match Address 172.17.130.*
PubkeyAuthentication yes
PasswordAuthentication yes
PermitRootLogin yes
Match Address 172.17.110.*
PubkeyAuthentication yes
PasswordAuthentication yes
PermitRootLogin yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment