sshd_config revision 240075
1240075Sdes#	$OpenBSD: sshd_config,v 1.87 2012/07/10 02:19:15 djm Exp $
299051Sdes#	$FreeBSD: head/crypto/openssh/sshd_config 240075 2012-09-03 16:51:41Z des $
357429Smarkm
498684Sdes# This is the sshd server system-wide configuration file.  See
598684Sdes# sshd_config(5) for more information.
676262Sgreen
798941Sdes# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
898941Sdes
992559Sdes# The strategy used for options in the default sshd_config shipped with
1092559Sdes# OpenSSH is to specify options with their default value where
11226046Sdes# possible, but leave them commented.  Uncommented options override the
1292559Sdes# default value.
1392559Sdes
1499051Sdes# Note that some of FreeBSD's defaults differ from OpenBSD's, and
1599051Sdes# FreeBSD has a few additional options.
1699051Sdes
1792559Sdes#Port 22
18147005Sdes#AddressFamily any
1957429Smarkm#ListenAddress 0.0.0.0
2057429Smarkm#ListenAddress ::
2169591Sgreen
22204917Sdes# The default requires explicit activation of protocol 1
23204917Sdes#Protocol 2
24181111Sdes
2592559Sdes# HostKey for protocol version 1
2692559Sdes#HostKey /etc/ssh/ssh_host_key
2792559Sdes# HostKeys for protocol version 2
28181111Sdes#HostKey /etc/ssh/ssh_host_rsa_key
2992559Sdes#HostKey /etc/ssh/ssh_host_dsa_key
30221420Sdes#HostKey /etc/ssh/ssh_host_ecdsa_key
3157429Smarkm
3292559Sdes# Lifetime and size of ephemeral version 1 server key
33124211Sdes#KeyRegenerationInterval 1h
34181111Sdes#ServerKeyBits 1024
3592559Sdes
3657429Smarkm# Logging
37149753Sdes# obsoletes QuietMode and FascistLogging
3892559Sdes#SyslogFacility AUTH
3992559Sdes#LogLevel INFO
4057429Smarkm
4192559Sdes# Authentication:
4292559Sdes
43124211Sdes#LoginGraceTime 2m
4499051Sdes#PermitRootLogin no
4592559Sdes#StrictModes yes
46137019Sdes#MaxAuthTries 6
47181111Sdes#MaxSessions 10
4892559Sdes
4992559Sdes#RSAAuthentication yes
5092559Sdes#PubkeyAuthentication yes
5192559Sdes
52226046Sdes# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
53226046Sdes# but this is overridden so installations will only check .ssh/authorized_keys
54226046SdesAuthorizedKeysFile	.ssh/authorized_keys
55226046Sdes
56240075Sdes#AuthorizedPrincipalsFile none
57240075Sdes
5892559Sdes# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
5992559Sdes#RhostsRSAAuthentication no
6076262Sgreen# similar for protocol version 2
6192559Sdes#HostbasedAuthentication no
6292559Sdes# Change to yes if you don't trust ~/.ssh/known_hosts for
6392559Sdes# RhostsRSAAuthentication and HostbasedAuthentication
6492559Sdes#IgnoreUserKnownHosts no
65124211Sdes# Don't read the user's ~/.rhosts and ~/.shosts files
66124211Sdes#IgnoreRhosts yes
6757429Smarkm
68126009Sdes# Change to yes to enable built-in password authentication.
69126009Sdes#PasswordAuthentication no
7092559Sdes#PermitEmptyPasswords no
7176262Sgreen
7299315Sdes# Change to no to disable PAM authentication
7395456Sdes#ChallengeResponseAuthentication yes
7457429Smarkm
7592559Sdes# Kerberos options
7698684Sdes#KerberosAuthentication no
7757429Smarkm#KerberosOrLocalPasswd yes
7892559Sdes#KerberosTicketCleanup yes
79126277Sdes#KerberosGetAFSToken no
8057429Smarkm
81124211Sdes# GSSAPI options
82124211Sdes#GSSAPIAuthentication no
83126277Sdes#GSSAPICleanupCredentials yes
8457429Smarkm
85162856Sdes# Set this to 'no' to disable PAM authentication, account processing,
86137019Sdes# and session processing. If this is enabled, PAM authentication will 
87162856Sdes# be allowed through the ChallengeResponseAuthentication and
88162856Sdes# PasswordAuthentication.  Depending on your PAM configuration,
89162856Sdes# PAM authentication via ChallengeResponseAuthentication may bypass
90162856Sdes# the setting of "PermitRootLogin without-password".
91162856Sdes# If you just want the PAM account and session checks to run without
92162856Sdes# PAM authentication, then enable this but set PasswordAuthentication
93162856Sdes# and ChallengeResponseAuthentication to 'no'.
94127033Sdes#UsePAM yes
9592559Sdes
96181111Sdes#AllowAgentForwarding yes
97124211Sdes#AllowTcpForwarding yes
98124211Sdes#GatewayPorts no
9999051Sdes#X11Forwarding yes
10092559Sdes#X11DisplayOffset 10
10192559Sdes#X11UseLocalhost yes
10292559Sdes#PrintMotd yes
10392559Sdes#PrintLastLog yes
104126277Sdes#TCPKeepAlive yes
10557429Smarkm#UseLogin no
106240075Sdes#UsePrivilegeSeparation sandbox
107106130Sdes#PermitUserEnvironment no
108149753Sdes#Compression delayed
109124211Sdes#ClientAliveInterval 0
110124211Sdes#ClientAliveCountMax 3
111124211Sdes#UseDNS yes
112124211Sdes#PidFile /var/run/sshd.pid
113124211Sdes#MaxStartups 10
114157019Sdes#PermitTunnel no
115181111Sdes#ChrootDirectory none
116240075Sdes#VersionAddendum FreeBSD-20120901
11765674Skris
11892559Sdes# no default banner path
119181111Sdes#Banner none
12076262Sgreen
12192559Sdes# override default of no subsystems
12276262SgreenSubsystem	sftp	/usr/libexec/sftp-server
123162856Sdes
124224638Sbrooks# Disable HPN tuning improvements.
125224638Sbrooks#HPNDisabled no
126224638Sbrooks
127224638Sbrooks# Buffer size for HPN to non-HPN connections.
128224638Sbrooks#HPNBufferSize 2048
129224638Sbrooks
130224638Sbrooks# TCP receive socket buffer polling for HPN.  Disable on non autotuning kernels.
131224638Sbrooks#TcpRcvBufPoll yes
132224638Sbrooks
133224638Sbrooks# Allow the use of the NONE cipher.
134224638Sbrooks#NoneEnabled no
135224638Sbrooks
136162856Sdes# Example of overriding settings on a per-user basis
137162856Sdes#Match User anoncvs
138162856Sdes#	X11Forwarding no
139162856Sdes#	AllowTcpForwarding no
140162856Sdes#	ForceCommand cvs server
141