blob: 1b53a0efb91fcd232f2be78c8cd95823cc5c766d [file] [log] [blame]
Darren Tucker7499b0c2008-07-02 22:35:43 +10001# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm 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
10# possible, but leave them commented. Uncommented options change a
11# 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 Tucker506ed882007-03-21 20:42:24 +110018# Disable legacy (protocol version 1) support in the server for new
19# installations. In future the default will change to require explicit
20# activation of protocol 1
21Protocol 2
22
Ben Lindstromc4b72252001-06-09 01:09:51 +000023# HostKey for protocol version 1
Damien Miller05eda432002-02-10 18:32:28 +110024#HostKey /etc/ssh/ssh_host_key
Ben Lindstromc4b72252001-06-09 01:09:51 +000025# HostKeys for protocol version 2
Damien Miller05eda432002-02-10 18:32:28 +110026#HostKey /etc/ssh/ssh_host_rsa_key
27#HostKey /etc/ssh/ssh_host_dsa_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
Damien Miller886c63a2000-01-20 23:13:36 +110033# Logging
Damien Miller06b75ad2005-05-26 12:12:37 +100034# obsoletes QuietMode and FascistLogging
Damien Miller2bec5c12002-01-22 23:32:07 +110035#SyslogFacility AUTH
36#LogLevel INFO
Damien Miller9ba30241999-11-11 21:07:00 +110037
Ben Lindstromc4b72252001-06-09 01:09:51 +000038# Authentication:
39
Darren Tuckerb8dae8e2003-06-22 20:48:45 +100040#LoginGraceTime 2m
Damien Miller2bec5c12002-01-22 23:32:07 +110041#PermitRootLogin yes
42#StrictModes yes
Darren Tucker89413db2004-05-24 10:36:23 +100043#MaxAuthTries 6
Damien Miller7207f642008-05-19 15:34:50 +100044#MaxSessions 10
Ben Lindstromc4b72252001-06-09 01:09:51 +000045
Damien Miller2bec5c12002-01-22 23:32:07 +110046#RSAAuthentication yes
47#PubkeyAuthentication yes
48#AuthorizedKeysFile .ssh/authorized_keys
Damien Millerd4a8b7e1999-10-27 13:42:43 +100049
Damien Miller05eda432002-02-10 18:32:28 +110050# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
Damien Miller2bec5c12002-01-22 23:32:07 +110051#RhostsRSAAuthentication no
Ben Lindstromc4b72252001-06-09 01:09:51 +000052# similar for protocol version 2
Damien Miller2bec5c12002-01-22 23:32:07 +110053#HostbasedAuthentication no
54# Change to yes if you don't trust ~/.ssh/known_hosts for
55# RhostsRSAAuthentication and HostbasedAuthentication
56#IgnoreUserKnownHosts no
Darren Tuckerec960f22003-08-13 20:37:05 +100057# Don't read the user's ~/.rhosts and ~/.shosts files
58#IgnoreRhosts yes
Ben Lindstromc4b72252001-06-09 01:09:51 +000059
Damien Millerd4a8b7e1999-10-27 13:42:43 +100060# To disable tunneled clear text passwords, change to no here!
Damien Miller2bec5c12002-01-22 23:32:07 +110061#PasswordAuthentication yes
62#PermitEmptyPasswords no
Damien Miller33804262001-02-04 23:20:18 +110063
Damien Miller2bec5c12002-01-22 23:32:07 +110064# Change to no to disable s/key passwords
65#ChallengeResponseAuthentication yes
Damien Millerf8154422001-04-25 22:44:14 +100066
Damien Miller2bec5c12002-01-22 23:32:07 +110067# Kerberos options
Damien Millerd7de14b2002-04-23 21:04:51 +100068#KerberosAuthentication no
Damien Miller2bec5c12002-01-22 23:32:07 +110069#KerberosOrLocalPasswd yes
70#KerberosTicketCleanup yes
Darren Tucker22ef5082003-12-31 11:37:34 +110071#KerberosGetAFSToken no
Damien Miller2bec5c12002-01-22 23:32:07 +110072
Darren Tucker0efd1552003-08-26 11:49:55 +100073# GSSAPI options
74#GSSAPIAuthentication no
Darren Tuckera49d36e2003-10-02 16:20:54 +100075#GSSAPICleanupCredentials yes
Darren Tucker0efd1552003-08-26 11:49:55 +100076
Damien Miller701d0512004-05-23 11:47:58 +100077# Set this to 'yes' to enable PAM authentication, account processing,
78# and session processing. If this is enabled, PAM authentication will
Darren Tuckera4904f72006-02-23 21:35:30 +110079# be allowed through the ChallengeResponseAuthentication and
80# PasswordAuthentication. Depending on your PAM configuration,
81# PAM authentication via ChallengeResponseAuthentication may bypass
82# the setting of "PermitRootLogin without-password".
83# If you just want the PAM account and session checks to run without
84# PAM authentication, then enable this but set PasswordAuthentication
85# and ChallengeResponseAuthentication to 'no'.
Tim Riced4d18152003-09-25 19:04:34 -070086#UsePAM no
Damien Millerd4a8b7e1999-10-27 13:42:43 +100087
Damien Millerba3a6592008-05-19 14:58:22 +100088#AllowAgentForwarding yes
Darren Tuckerb8dae8e2003-06-22 20:48:45 +100089#AllowTcpForwarding yes
90#GatewayPorts no
Damien Miller2bec5c12002-01-22 23:32:07 +110091#X11Forwarding no
92#X11DisplayOffset 10
Damien Miller95c249f2002-02-05 12:11:34 +110093#X11UseLocalhost yes
Damien Miller2bec5c12002-01-22 23:32:07 +110094#PrintMotd yes
95#PrintLastLog yes
Darren Tucker0b3b9752003-12-31 11:38:32 +110096#TCPKeepAlive yes
Damien Millerc30d35c2000-08-30 09:40:09 +110097#UseLogin no
Ben Lindstromfb62a692002-06-06 19:47:11 +000098#UsePrivilegeSeparation yes
Ben Lindstrom5d860f02002-08-01 01:28:38 +000099#PermitUserEnvironment no
Damien Miller9786e6e2005-07-26 21:54:56 +1000100#Compression delayed
Darren Tuckerb8dae8e2003-06-22 20:48:45 +1000101#ClientAliveInterval 0
102#ClientAliveCountMax 3
103#UseDNS yes
104#PidFile /var/run/sshd.pid
Damien Miller2bec5c12002-01-22 23:32:07 +1100105#MaxStartups 10
Damien Millerd27b9472005-12-13 19:29:02 +1100106#PermitTunnel no
Damien Millerd8cb1f12008-02-10 22:40:12 +1100107#ChrootDirectory none
Darren Tuckerb8dae8e2003-06-22 20:48:45 +1000108
Damien Miller2bec5c12002-01-22 23:32:07 +1100109# no default banner path
Damien Miller4890e532007-09-17 11:57:38 +1000110#Banner none
Ben Lindstrome9d04442001-02-10 23:26:35 +0000111
Damien Miller2bec5c12002-01-22 23:32:07 +1100112# override default of no subsystems
Ben Lindstrome9d04442001-02-10 23:26:35 +0000113Subsystem sftp /usr/libexec/sftp-server
Damien Millere2754432006-07-24 14:06:47 +1000114
115# Example of overriding settings on a per-user basis
116#Match User anoncvs
117# X11Forwarding no
118# AllowTcpForwarding no
119# ForceCommand cvs server