1255767Sdes#	$OpenBSD: sshd_config,v 1.90 2013/05/16 04:09:14 dtucker Exp $
299051Sdes#	$FreeBSD$
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
36255767Sdes# Ciphers and keying
37255767Sdes#RekeyLimit default none
38255767Sdes
3957429Smarkm# Logging
40149753Sdes# obsoletes QuietMode and FascistLogging
4192559Sdes#SyslogFacility AUTH
4292559Sdes#LogLevel INFO
4357429Smarkm
4492559Sdes# Authentication:
4592559Sdes
46124211Sdes#LoginGraceTime 2m
4799051Sdes#PermitRootLogin no
4892559Sdes#StrictModes yes
49137019Sdes#MaxAuthTries 6
50181111Sdes#MaxSessions 10
5192559Sdes
5292559Sdes#RSAAuthentication yes
5392559Sdes#PubkeyAuthentication yes
5492559Sdes
55226046Sdes# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
56248465Sdes#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
57226046Sdes
58240075Sdes#AuthorizedPrincipalsFile none
59240075Sdes
60248619Sdes#AuthorizedKeysCommand none
61248619Sdes#AuthorizedKeysCommandUser nobody
62248619Sdes
6392559Sdes# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
6492559Sdes#RhostsRSAAuthentication no
6576262Sgreen# similar for protocol version 2
6692559Sdes#HostbasedAuthentication no
6792559Sdes# Change to yes if you don't trust ~/.ssh/known_hosts for
6892559Sdes# RhostsRSAAuthentication and HostbasedAuthentication
6992559Sdes#IgnoreUserKnownHosts no
70124211Sdes# Don't read the user's ~/.rhosts and ~/.shosts files
71124211Sdes#IgnoreRhosts yes
7257429Smarkm
73126009Sdes# Change to yes to enable built-in password authentication.
74126009Sdes#PasswordAuthentication no
7592559Sdes#PermitEmptyPasswords no
7676262Sgreen
7799315Sdes# Change to no to disable PAM authentication
7895456Sdes#ChallengeResponseAuthentication yes
7957429Smarkm
8092559Sdes# Kerberos options
8198684Sdes#KerberosAuthentication no
8257429Smarkm#KerberosOrLocalPasswd yes
8392559Sdes#KerberosTicketCleanup yes
84126277Sdes#KerberosGetAFSToken no
8557429Smarkm
86124211Sdes# GSSAPI options
87124211Sdes#GSSAPIAuthentication no
88126277Sdes#GSSAPICleanupCredentials yes
8957429Smarkm
90162856Sdes# Set this to 'no' to disable PAM authentication, account processing,
91137019Sdes# and session processing. If this is enabled, PAM authentication will 
92162856Sdes# be allowed through the ChallengeResponseAuthentication and
93162856Sdes# PasswordAuthentication.  Depending on your PAM configuration,
94162856Sdes# PAM authentication via ChallengeResponseAuthentication may bypass
95162856Sdes# the setting of "PermitRootLogin without-password".
96162856Sdes# If you just want the PAM account and session checks to run without
97162856Sdes# PAM authentication, then enable this but set PasswordAuthentication
98162856Sdes# and ChallengeResponseAuthentication to 'no'.
99127033Sdes#UsePAM yes
10092559Sdes
101181111Sdes#AllowAgentForwarding yes
102124211Sdes#AllowTcpForwarding yes
103124211Sdes#GatewayPorts no
10499051Sdes#X11Forwarding yes
10592559Sdes#X11DisplayOffset 10
10692559Sdes#X11UseLocalhost yes
10792559Sdes#PrintMotd yes
10892559Sdes#PrintLastLog yes
109126277Sdes#TCPKeepAlive yes
11057429Smarkm#UseLogin no
111252338Sdes#UsePrivilegeSeparation yes
112106130Sdes#PermitUserEnvironment no
113149753Sdes#Compression delayed
114124211Sdes#ClientAliveInterval 0
115124211Sdes#ClientAliveCountMax 3
116124211Sdes#UseDNS yes
117124211Sdes#PidFile /var/run/sshd.pid
118248619Sdes#MaxStartups 10:30:100
119157019Sdes#PermitTunnel no
120181111Sdes#ChrootDirectory none
121258343Sdes#VersionAddendum FreeBSD-20131111
12265674Skris
12392559Sdes# no default banner path
124181111Sdes#Banner none
12576262Sgreen
12692559Sdes# override default of no subsystems
12776262SgreenSubsystem	sftp	/usr/libexec/sftp-server
128162856Sdes
129224638Sbrooks# Disable HPN tuning improvements.
130224638Sbrooks#HPNDisabled no
131224638Sbrooks
132224638Sbrooks# Buffer size for HPN to non-HPN connections.
133224638Sbrooks#HPNBufferSize 2048
134224638Sbrooks
135224638Sbrooks# TCP receive socket buffer polling for HPN.  Disable on non autotuning kernels.
136224638Sbrooks#TcpRcvBufPoll yes
137224638Sbrooks
138224638Sbrooks# Allow the use of the NONE cipher.
139224638Sbrooks#NoneEnabled no
140224638Sbrooks
141162856Sdes# Example of overriding settings on a per-user basis
142162856Sdes#Match User anoncvs
143162856Sdes#	X11Forwarding no
144162856Sdes#	AllowTcpForwarding no
145162856Sdes#	ForceCommand cvs server
146