blob: c9042ac3c7c214effc7ee7b0a97eff3fa13141b2 [file] [log] [blame]
deraadt@openbsd.org3cd51032015-02-02 01:57:44 +00001# $OpenBSD: sshd_config,v 1.94 2015/02/02 01:57:44 deraadt Exp $
Tim Rice59ea0a02001-03-10 13:50:45 -08002
Ben Lindstrom9721e922002-06-21 01:06:03 +00003# This is the sshd server system-wide configuration file. See
4# sshd_config(5) for more information.
Damien Millerd4a8b7e1999-10-27 13:42:43 +10005
Tim Rice1e2c6002002-01-30 22:14:03 -08006# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
7
Damien Miller95ca7e92002-02-19 15:29:02 +11008# The strategy used for options in the default sshd_config shipped with
Damien Miller2bec5c12002-01-22 23:32:07 +11009# OpenSSH is to specify options with their default value where
Damien Millerfd53abd2011-05-15 08:36:02 +100010# possible, but leave them commented. Uncommented options override the
Damien Miller2bec5c12002-01-22 23:32:07 +110011# default value.
12
13#Port 22
Darren Tucker0f383232005-01-20 10:57:56 +110014#AddressFamily any
Kevin Steves8ee4f692001-01-09 15:28:46 +000015#ListenAddress 0.0.0.0
Damien Miller34132e52000-01-14 15:45:46 +110016#ListenAddress ::
Ben Lindstromc4b72252001-06-09 01:09:51 +000017
Darren Tuckerbad50762009-10-11 21:51:08 +110018# The default requires explicit activation of protocol 1
19#Protocol 2
Darren Tucker506ed882007-03-21 20:42:24 +110020
Ben Lindstromc4b72252001-06-09 01:09:51 +000021# HostKey for protocol version 1
Damien Miller05eda432002-02-10 18:32:28 +110022#HostKey /etc/ssh/ssh_host_key
Ben Lindstromc4b72252001-06-09 01:09:51 +000023# HostKeys for protocol version 2
Damien Miller05eda432002-02-10 18:32:28 +110024#HostKey /etc/ssh/ssh_host_rsa_key
25#HostKey /etc/ssh/ssh_host_dsa_key
Damien Miller80ed82a2010-09-10 11:20:11 +100026#HostKey /etc/ssh/ssh_host_ecdsa_key
Damien Milleraf5d4482014-01-12 19:20:47 +110027#HostKey /etc/ssh/ssh_host_ed25519_key
Ben Lindstromc4b72252001-06-09 01:09:51 +000028
29# Lifetime and size of ephemeral version 1 server key
Darren Tuckerb8dae8e2003-06-22 20:48:45 +100030#KeyRegenerationInterval 1h
Darren Tucker7499b0c2008-07-02 22:35:43 +100031#ServerKeyBits 1024
Damien Miller192bd011999-11-13 23:56:35 +110032
Darren Tucker5f96f3b2013-05-16 20:29:28 +100033# Ciphers and keying
34#RekeyLimit default none
35
Damien Miller886c63a2000-01-20 23:13:36 +110036# Logging
Damien Miller06b75ad2005-05-26 12:12:37 +100037# obsoletes QuietMode and FascistLogging
Damien Miller2bec5c12002-01-22 23:32:07 +110038#SyslogFacility AUTH
39#LogLevel INFO
Damien Miller9ba30241999-11-11 21:07:00 +110040
Ben Lindstromc4b72252001-06-09 01:09:51 +000041# Authentication:
42
Darren Tuckerb8dae8e2003-06-22 20:48:45 +100043#LoginGraceTime 2m
Damien Miller2bec5c12002-01-22 23:32:07 +110044#PermitRootLogin yes
45#StrictModes yes
Darren Tucker89413db2004-05-24 10:36:23 +100046#MaxAuthTries 6
Damien Miller7207f642008-05-19 15:34:50 +100047#MaxSessions 10
Ben Lindstromc4b72252001-06-09 01:09:51 +000048
Damien Miller2bec5c12002-01-22 23:32:07 +110049#RSAAuthentication yes
50#PubkeyAuthentication yes
Damien Millerd8478b62011-05-29 21:39:36 +100051
52# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
53# but this is overridden so installations will only check .ssh/authorized_keys
54AuthorizedKeysFile .ssh/authorized_keys
Damien Millerd4a8b7e1999-10-27 13:42:43 +100055
Damien Miller8fef9eb2012-04-22 11:25:10 +100056#AuthorizedPrincipalsFile none
57
Damien Miller09d3e122012-10-31 08:58:58 +110058#AuthorizedKeysCommand none
59#AuthorizedKeysCommandUser nobody
60
Damien Miller05eda432002-02-10 18:32:28 +110061# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
Damien Miller2bec5c12002-01-22 23:32:07 +110062#RhostsRSAAuthentication no
Ben Lindstromc4b72252001-06-09 01:09:51 +000063# similar for protocol version 2
Damien Miller2bec5c12002-01-22 23:32:07 +110064#HostbasedAuthentication no
65# Change to yes if you don't trust ~/.ssh/known_hosts for
66# RhostsRSAAuthentication and HostbasedAuthentication
67#IgnoreUserKnownHosts no
Darren Tuckerec960f22003-08-13 20:37:05 +100068# Don't read the user's ~/.rhosts and ~/.shosts files
69#IgnoreRhosts yes
Ben Lindstromc4b72252001-06-09 01:09:51 +000070
Damien Millerd4a8b7e1999-10-27 13:42:43 +100071# To disable tunneled clear text passwords, change to no here!
Damien Miller2bec5c12002-01-22 23:32:07 +110072#PasswordAuthentication yes
73#PermitEmptyPasswords no
Damien Miller33804262001-02-04 23:20:18 +110074
Damien Miller2bec5c12002-01-22 23:32:07 +110075# Change to no to disable s/key passwords
76#ChallengeResponseAuthentication yes
Damien Millerf8154422001-04-25 22:44:14 +100077
Damien Miller2bec5c12002-01-22 23:32:07 +110078# Kerberos options
Damien Millerd7de14b2002-04-23 21:04:51 +100079#KerberosAuthentication no
Damien Miller2bec5c12002-01-22 23:32:07 +110080#KerberosOrLocalPasswd yes
81#KerberosTicketCleanup yes
Darren Tucker22ef5082003-12-31 11:37:34 +110082#KerberosGetAFSToken no
Damien Miller2bec5c12002-01-22 23:32:07 +110083
Darren Tucker0efd1552003-08-26 11:49:55 +100084# GSSAPI options
85#GSSAPIAuthentication no
Darren Tuckera49d36e2003-10-02 16:20:54 +100086#GSSAPICleanupCredentials yes
Darren Tucker0efd1552003-08-26 11:49:55 +100087
Darren Tuckere90a06a2013-09-18 15:09:38 +100088# Set this to 'yes' to enable PAM authentication, account processing,
89# and session processing. If this is enabled, PAM authentication will
Darren Tuckera4904f72006-02-23 21:35:30 +110090# be allowed through the ChallengeResponseAuthentication and
91# PasswordAuthentication. Depending on your PAM configuration,
92# PAM authentication via ChallengeResponseAuthentication may bypass
93# the setting of "PermitRootLogin without-password".
94# If you just want the PAM account and session checks to run without
95# PAM authentication, then enable this but set PasswordAuthentication
96# and ChallengeResponseAuthentication to 'no'.
Tim Riced4d18152003-09-25 19:04:34 -070097#UsePAM no
Damien Millerd4a8b7e1999-10-27 13:42:43 +100098
Damien Millerba3a6592008-05-19 14:58:22 +100099#AllowAgentForwarding yes
Darren Tuckerb8dae8e2003-06-22 20:48:45 +1000100#AllowTcpForwarding yes
101#GatewayPorts no
Damien Miller2bec5c12002-01-22 23:32:07 +1100102#X11Forwarding no
103#X11DisplayOffset 10
Damien Miller95c249f2002-02-05 12:11:34 +1100104#X11UseLocalhost yes
Damien Miller5ff30c62013-10-30 22:21:50 +1100105#PermitTTY yes
Damien Miller2bec5c12002-01-22 23:32:07 +1100106#PrintMotd yes
107#PrintLastLog yes
Darren Tucker0b3b9752003-12-31 11:38:32 +1100108#TCPKeepAlive yes
Damien Millerc30d35c2000-08-30 09:40:09 +1100109#UseLogin no
Damien Miller5a5c2b92012-07-31 12:21:34 +1000110UsePrivilegeSeparation sandbox # Default for new installations.
Ben Lindstrom5d860f02002-08-01 01:28:38 +0000111#PermitUserEnvironment no
Damien Miller9786e6e2005-07-26 21:54:56 +1000112#Compression delayed
Darren Tuckerb8dae8e2003-06-22 20:48:45 +1000113#ClientAliveInterval 0
114#ClientAliveCountMax 3
deraadt@openbsd.org3cd51032015-02-02 01:57:44 +0000115#UseDNS no
Darren Tuckerb8dae8e2003-06-22 20:48:45 +1000116#PidFile /var/run/sshd.pid
Damien Miller1f583df2013-02-12 11:02:08 +1100117#MaxStartups 10:30:100
Damien Millerd27b9472005-12-13 19:29:02 +1100118#PermitTunnel no
Damien Millerd8cb1f12008-02-10 22:40:12 +1100119#ChrootDirectory none
Damien Miller23528812012-04-22 11:24:43 +1000120#VersionAddendum none
Darren Tuckerb8dae8e2003-06-22 20:48:45 +1000121
Damien Miller2bec5c12002-01-22 23:32:07 +1100122# no default banner path
Damien Miller4890e532007-09-17 11:57:38 +1000123#Banner none
Ben Lindstrome9d04442001-02-10 23:26:35 +0000124
Damien Miller2bec5c12002-01-22 23:32:07 +1100125# override default of no subsystems
Ben Lindstrome9d04442001-02-10 23:26:35 +0000126Subsystem sftp /usr/libexec/sftp-server
Damien Millere2754432006-07-24 14:06:47 +1000127
128# Example of overriding settings on a per-user basis
129#Match User anoncvs
130# X11Forwarding no
131# AllowTcpForwarding no
Damien Miller5ff30c62013-10-30 22:21:50 +1100132# PermitTTY no
Damien Millere2754432006-07-24 14:06:47 +1000133# ForceCommand cvs server