update sshd_config from Arch

OpenSSH 7.1p1-1

Note the sftp subsystem which differs between at least Debian and Arch.
This commit is contained in:
Aminda Suomalainen 2015-08-28 14:00:25 +03:00
parent f69a361ed1
commit 04df2e532b

View File

@ -1,13 +1,23 @@
# See the sshd_config(5) manpage for details # $OpenBSD: sshd_config,v 1.97 2015/08/06 14:53:21 deraadt Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
Port 22 Port 22
#Port 443 AddressFamily any
#Port 10000
# Use these options to restrict which interfaces/protocols sshd will bind to
ListenAddress ::
ListenAddress 0.0.0.0 ListenAddress 0.0.0.0
ListenAddress ::
# The default requires explicit activation of protocol 1
Protocol 2 Protocol 2
# HostKeys for protocol version 2 # HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ecdsa_key
@ -18,70 +28,71 @@ HostKey /etc/ssh/ssh_host_ed25519_key
# ssh-keygen -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key # ssh-keygen -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key
# ssh-keygen -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key # ssh-keygen -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security # Uncomment one of the following depending on which OS
UsePrivilegeSeparation yes ## Arch
#Subsystem sftp /usr/lib/ssh/sftp-server
## Debian
#Subsystem sftp /usr/lib/openssh/sftp-server
# Lifetime and size of ephemeral version 1 server key # Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600 #KeyRegenerationInterval 1h
ServerKeyBits 1024 #ServerKeyBits 1024
# Ciphers and keying
#RekeyLimit default none
# Logging # Logging
SyslogFacility AUTH # obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
LogLevel VERBOSE LogLevel VERBOSE
# Authentication: # Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes
RSAAuthentication yes #LoginGraceTime 2m
PubkeyAuthentication yes PermitRootLogin prohibit-password
#AuthorizedKeysFile %h/.ssh/authorized_keys #StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
# Don't read the user's ~/.rhosts and ~/.shosts files #RSAAuthentication yes
IgnoreRhosts yes #PubkeyAuthentication yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2 # similar for protocol version 2
HostbasedAuthentication no #HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication # Change to yes if you don't trust ~/.ssh/known_hosts for
#IgnoreUserKnownHosts yes # RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED) # To disable tunneled clear text passwords, change to no here!
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no PasswordAuthentication no
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
ChallengeResponseAuthentication no
# Kerberos options # Kerberos options
#KerberosAuthentication no #KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes #KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes #KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options # GSSAPI options
#GSSAPIAuthentication no #GSSAPIAuthentication no
#GSSAPICleanupCredentials yes #GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
# Set this to 'yes' to enable PAM authentication, account processing, # Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will # and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and # be allowed through the ChallengeResponseAuthentication and
@ -92,3 +103,35 @@ Subsystem sftp /usr/lib/openssh/sftp-server
# PAM authentication, then enable this but set PasswordAuthentication # PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'. # and ChallengeResponseAuthentication to 'no'.
UsePAM yes UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no # pam does that
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
Banner /etc/issue
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server