Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 1 | # $OpenBSD: sshd_config,v 1.77 2008/02/08 23:24:07 djm Exp $ |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2 | |
Ben Lindstrom | 9721e92 | 2002-06-21 01:06:03 +0000 | [diff] [blame] | 3 | # This is the sshd server system-wide configuration file. See |
| 4 | # sshd_config(5) for more information. |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 5 | |
Tim Rice | 1e2c600 | 2002-01-30 22:14:03 -0800 | [diff] [blame] | 6 | # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin |
| 7 | |
Damien Miller | 95ca7e9 | 2002-02-19 15:29:02 +1100 | [diff] [blame] | 8 | # The strategy used for options in the default sshd_config shipped with |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 9 | # 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 Tucker | 0f38323 | 2005-01-20 10:57:56 +1100 | [diff] [blame] | 14 | #AddressFamily any |
Kevin Steves | 8ee4f69 | 2001-01-09 15:28:46 +0000 | [diff] [blame] | 15 | #ListenAddress 0.0.0.0 |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 16 | #ListenAddress :: |
Ben Lindstrom | c4b7225 | 2001-06-09 01:09:51 +0000 | [diff] [blame] | 17 | |
Darren Tucker | 506ed88 | 2007-03-21 20:42:24 +1100 | [diff] [blame] | 18 | # 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 |
| 21 | Protocol 2 |
| 22 | |
Ben Lindstrom | c4b7225 | 2001-06-09 01:09:51 +0000 | [diff] [blame] | 23 | # HostKey for protocol version 1 |
Damien Miller | 05eda43 | 2002-02-10 18:32:28 +1100 | [diff] [blame] | 24 | #HostKey /etc/ssh/ssh_host_key |
Ben Lindstrom | c4b7225 | 2001-06-09 01:09:51 +0000 | [diff] [blame] | 25 | # HostKeys for protocol version 2 |
Damien Miller | 05eda43 | 2002-02-10 18:32:28 +1100 | [diff] [blame] | 26 | #HostKey /etc/ssh/ssh_host_rsa_key |
| 27 | #HostKey /etc/ssh/ssh_host_dsa_key |
Ben Lindstrom | c4b7225 | 2001-06-09 01:09:51 +0000 | [diff] [blame] | 28 | |
| 29 | # Lifetime and size of ephemeral version 1 server key |
Darren Tucker | b8dae8e | 2003-06-22 20:48:45 +1000 | [diff] [blame] | 30 | #KeyRegenerationInterval 1h |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 31 | #ServerKeyBits 768 |
Damien Miller | 192bd01 | 1999-11-13 23:56:35 +1100 | [diff] [blame] | 32 | |
Damien Miller | 886c63a | 2000-01-20 23:13:36 +1100 | [diff] [blame] | 33 | # Logging |
Damien Miller | 06b75ad | 2005-05-26 12:12:37 +1000 | [diff] [blame] | 34 | # obsoletes QuietMode and FascistLogging |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 35 | #SyslogFacility AUTH |
| 36 | #LogLevel INFO |
Damien Miller | 9ba3024 | 1999-11-11 21:07:00 +1100 | [diff] [blame] | 37 | |
Ben Lindstrom | c4b7225 | 2001-06-09 01:09:51 +0000 | [diff] [blame] | 38 | # Authentication: |
| 39 | |
Darren Tucker | b8dae8e | 2003-06-22 20:48:45 +1000 | [diff] [blame] | 40 | #LoginGraceTime 2m |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 41 | #PermitRootLogin yes |
| 42 | #StrictModes yes |
Darren Tucker | 89413db | 2004-05-24 10:36:23 +1000 | [diff] [blame] | 43 | #MaxAuthTries 6 |
Ben Lindstrom | c4b7225 | 2001-06-09 01:09:51 +0000 | [diff] [blame] | 44 | |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 45 | #RSAAuthentication yes |
| 46 | #PubkeyAuthentication yes |
| 47 | #AuthorizedKeysFile .ssh/authorized_keys |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 48 | |
Damien Miller | 05eda43 | 2002-02-10 18:32:28 +1100 | [diff] [blame] | 49 | # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 50 | #RhostsRSAAuthentication no |
Ben Lindstrom | c4b7225 | 2001-06-09 01:09:51 +0000 | [diff] [blame] | 51 | # similar for protocol version 2 |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 52 | #HostbasedAuthentication no |
| 53 | # Change to yes if you don't trust ~/.ssh/known_hosts for |
| 54 | # RhostsRSAAuthentication and HostbasedAuthentication |
| 55 | #IgnoreUserKnownHosts no |
Darren Tucker | ec960f2 | 2003-08-13 20:37:05 +1000 | [diff] [blame] | 56 | # Don't read the user's ~/.rhosts and ~/.shosts files |
| 57 | #IgnoreRhosts yes |
Ben Lindstrom | c4b7225 | 2001-06-09 01:09:51 +0000 | [diff] [blame] | 58 | |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 59 | # To disable tunneled clear text passwords, change to no here! |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 60 | #PasswordAuthentication yes |
| 61 | #PermitEmptyPasswords no |
Damien Miller | 3380426 | 2001-02-04 23:20:18 +1100 | [diff] [blame] | 62 | |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 63 | # Change to no to disable s/key passwords |
| 64 | #ChallengeResponseAuthentication yes |
Damien Miller | f815442 | 2001-04-25 22:44:14 +1000 | [diff] [blame] | 65 | |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 66 | # Kerberos options |
Damien Miller | d7de14b | 2002-04-23 21:04:51 +1000 | [diff] [blame] | 67 | #KerberosAuthentication no |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 68 | #KerberosOrLocalPasswd yes |
| 69 | #KerberosTicketCleanup yes |
Darren Tucker | 22ef508 | 2003-12-31 11:37:34 +1100 | [diff] [blame] | 70 | #KerberosGetAFSToken no |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 71 | |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 72 | # GSSAPI options |
| 73 | #GSSAPIAuthentication no |
Darren Tucker | a49d36e | 2003-10-02 16:20:54 +1000 | [diff] [blame] | 74 | #GSSAPICleanupCredentials yes |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 75 | |
Damien Miller | 701d051 | 2004-05-23 11:47:58 +1000 | [diff] [blame] | 76 | # Set this to 'yes' to enable PAM authentication, account processing, |
| 77 | # and session processing. If this is enabled, PAM authentication will |
Darren Tucker | a4904f7 | 2006-02-23 21:35:30 +1100 | [diff] [blame] | 78 | # be allowed through the ChallengeResponseAuthentication and |
| 79 | # PasswordAuthentication. Depending on your PAM configuration, |
| 80 | # PAM authentication via ChallengeResponseAuthentication may bypass |
| 81 | # the setting of "PermitRootLogin without-password". |
| 82 | # If you just want the PAM account and session checks to run without |
| 83 | # PAM authentication, then enable this but set PasswordAuthentication |
| 84 | # and ChallengeResponseAuthentication to 'no'. |
Tim Rice | d4d1815 | 2003-09-25 19:04:34 -0700 | [diff] [blame] | 85 | #UsePAM no |
Damien Miller | d4a8b7e | 1999-10-27 13:42:43 +1000 | [diff] [blame] | 86 | |
Darren Tucker | b8dae8e | 2003-06-22 20:48:45 +1000 | [diff] [blame] | 87 | #AllowTcpForwarding yes |
| 88 | #GatewayPorts no |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 89 | #X11Forwarding no |
| 90 | #X11DisplayOffset 10 |
Damien Miller | 95c249f | 2002-02-05 12:11:34 +1100 | [diff] [blame] | 91 | #X11UseLocalhost yes |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 92 | #PrintMotd yes |
| 93 | #PrintLastLog yes |
Darren Tucker | 0b3b975 | 2003-12-31 11:38:32 +1100 | [diff] [blame] | 94 | #TCPKeepAlive yes |
Damien Miller | c30d35c | 2000-08-30 09:40:09 +1100 | [diff] [blame] | 95 | #UseLogin no |
Ben Lindstrom | fb62a69 | 2002-06-06 19:47:11 +0000 | [diff] [blame] | 96 | #UsePrivilegeSeparation yes |
Ben Lindstrom | 5d860f0 | 2002-08-01 01:28:38 +0000 | [diff] [blame] | 97 | #PermitUserEnvironment no |
Damien Miller | 9786e6e | 2005-07-26 21:54:56 +1000 | [diff] [blame] | 98 | #Compression delayed |
Darren Tucker | b8dae8e | 2003-06-22 20:48:45 +1000 | [diff] [blame] | 99 | #ClientAliveInterval 0 |
| 100 | #ClientAliveCountMax 3 |
| 101 | #UseDNS yes |
| 102 | #PidFile /var/run/sshd.pid |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 103 | #MaxStartups 10 |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 104 | #PermitTunnel no |
Damien Miller | d8cb1f1 | 2008-02-10 22:40:12 +1100 | [diff] [blame] | 105 | #ChrootDirectory none |
Darren Tucker | b8dae8e | 2003-06-22 20:48:45 +1000 | [diff] [blame] | 106 | |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 107 | # no default banner path |
Damien Miller | 4890e53 | 2007-09-17 11:57:38 +1000 | [diff] [blame] | 108 | #Banner none |
Ben Lindstrom | e9d0444 | 2001-02-10 23:26:35 +0000 | [diff] [blame] | 109 | |
Damien Miller | 2bec5c1 | 2002-01-22 23:32:07 +1100 | [diff] [blame] | 110 | # override default of no subsystems |
Ben Lindstrom | e9d0444 | 2001-02-10 23:26:35 +0000 | [diff] [blame] | 111 | Subsystem sftp /usr/libexec/sftp-server |
Damien Miller | e275443 | 2006-07-24 14:06:47 +1000 | [diff] [blame] | 112 | |
| 113 | # Example of overriding settings on a per-user basis |
| 114 | #Match User anoncvs |
| 115 | # X11Forwarding no |
| 116 | # AllowTcpForwarding no |
| 117 | # ForceCommand cvs server |