sshd_config revision 1.22.2.1 1 1.22.2.1 christos # $NetBSD: sshd_config,v 1.22.2.1 2019/06/10 21:41:12 christos Exp $
2 1.22.2.1 christos # $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
3 1.1 christos
4 1.1 christos # This is the sshd server system-wide configuration file. See
5 1.1 christos # sshd_config(5) for more information.
6 1.1 christos
7 1.1 christos # The strategy used for options in the default sshd_config shipped with
8 1.1 christos # OpenSSH is to specify options with their default value where
9 1.8 christos # possible, but leave them commented. Uncommented options override the
10 1.1 christos # default value.
11 1.1 christos
12 1.1 christos #Port 22
13 1.1 christos #AddressFamily any
14 1.1 christos #ListenAddress 0.0.0.0
15 1.1 christos #ListenAddress ::
16 1.1 christos
17 1.1 christos #HostKey /etc/ssh/ssh_host_rsa_key
18 1.7 christos #HostKey /etc/ssh/ssh_host_ecdsa_key
19 1.12 christos #HostKey /etc/ssh/ssh_host_ed25519_key
20 1.1 christos
21 1.11 christos # Ciphers and keying
22 1.11 christos #RekeyLimit default none
23 1.11 christos
24 1.1 christos # Logging
25 1.1 christos #SyslogFacility AUTH
26 1.1 christos #LogLevel INFO
27 1.1 christos
28 1.1 christos # Authentication:
29 1.1 christos
30 1.19 christos # For slow CPUs, bumped from 2 minutes to 10
31 1.19 christos LoginGraceTime 600
32 1.15 christos #PermitRootLogin prohibit-password
33 1.1 christos #StrictModes yes
34 1.1 christos #MaxAuthTries 6
35 1.1 christos #MaxSessions 10
36 1.1 christos
37 1.1 christos #PubkeyAuthentication yes
38 1.8 christos
39 1.8 christos # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
40 1.8 christos # but this is overridden so installations will only check .ssh/authorized_keys
41 1.8 christos AuthorizedKeysFile .ssh/authorized_keys
42 1.1 christos
43 1.9 christos #AuthorizedPrincipalsFile none
44 1.9 christos
45 1.10 christos #AuthorizedKeysCommand none
46 1.10 christos #AuthorizedKeysCommandUser nobody
47 1.10 christos
48 1.1 christos # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
49 1.1 christos #HostbasedAuthentication no
50 1.1 christos # Change to yes if you don't trust ~/.ssh/known_hosts for
51 1.18 christos # HostbasedAuthentication
52 1.1 christos #IgnoreUserKnownHosts no
53 1.1 christos # Don't read the user's ~/.rhosts and ~/.shosts files
54 1.1 christos #IgnoreRhosts yes
55 1.1 christos
56 1.6 jruoho # To disable password authentication, set this and UsePam to no
57 1.1 christos #PasswordAuthentication yes
58 1.1 christos #PermitEmptyPasswords no
59 1.1 christos
60 1.1 christos # Change to no to disable s/key passwords
61 1.1 christos #ChallengeResponseAuthentication yes
62 1.1 christos
63 1.1 christos #AllowAgentForwarding yes
64 1.1 christos #AllowTcpForwarding yes
65 1.1 christos #GatewayPorts no
66 1.1 christos #X11Forwarding no
67 1.2 christos # If you use xorg from pkgsrc then uncomment the following line.
68 1.2 christos #XAuthLocation /usr/pkg/bin/xauth
69 1.1 christos #X11DisplayOffset 10
70 1.1 christos #X11UseLocalhost yes
71 1.12 christos #PermitTTY yes
72 1.1 christos #PrintMotd yes
73 1.1 christos #PrintLastLog yes
74 1.1 christos #TCPKeepAlive yes
75 1.1 christos #UseLogin no
76 1.16 christos #UsePrivilegeSeparation sandbox
77 1.2 christos UsePam yes
78 1.1 christos #PermitUserEnvironment no
79 1.1 christos #Compression delayed
80 1.1 christos #ClientAliveInterval 0
81 1.1 christos #ClientAliveCountMax 3
82 1.13 christos #UseDNS no
83 1.1 christos #PidFile /var/run/sshd.pid
84 1.10 christos #MaxStartups 10:30:100
85 1.1 christos #PermitTunnel no
86 1.1 christos #ChrootDirectory none
87 1.9 christos #VersionAddendum none
88 1.1 christos
89 1.1 christos # no default banner path
90 1.1 christos #Banner none
91 1.1 christos
92 1.5 adam # here are the new patched ldap related tokens
93 1.5 adam # entries in your LDAP must have posixAccount & ldapPublicKey objectclass
94 1.5 adam #UseLPK yes
95 1.5 adam #LpkLdapConf /etc/ldap.conf
96 1.5 adam #LpkServers ldap://10.1.7.1/ ldap://10.1.7.2/
97 1.5 adam #LpkUserDN ou=users,dc=phear,dc=org
98 1.5 adam #LpkGroupDN ou=groups,dc=phear,dc=org
99 1.5 adam #LpkBindDN cn=Manager,dc=phear,dc=org
100 1.5 adam #LpkBindPw secret
101 1.5 adam #LpkServerGroup mail
102 1.5 adam #LpkFilter (hostAccess=master.phear.org)
103 1.5 adam #LpkForceTLS no
104 1.5 adam #LpkSearchTimelimit 3
105 1.5 adam #LpkBindTimelimit 3
106 1.5 adam #LpkPubKeyAttr sshPublicKey
107 1.5 adam
108 1.1 christos # override default of no subsystems
109 1.1 christos Subsystem sftp /usr/libexec/sftp-server
110 1.1 christos
111 1.2 christos # the following are HPN related configuration options
112 1.2 christos # tcp receive buffer polling. disable in non autotuning kernels
113 1.2 christos #TcpRcvBufPoll yes
114 1.3 dyoung
115 1.2 christos # allow the use of the none cipher
116 1.2 christos #NoneEnabled no
117 1.2 christos
118 1.3 dyoung # disable hpn performance boosts.
119 1.2 christos #HPNDisabled no
120 1.2 christos
121 1.2 christos # buffer size for hpn to non-hpn connections
122 1.2 christos #HPNBufferSize 2048
123 1.2 christos
124 1.2 christos
125 1.1 christos # Example of overriding settings on a per-user basis
126 1.1 christos #Match User anoncvs
127 1.1 christos # X11Forwarding no
128 1.1 christos # AllowTcpForwarding no
129 1.12 christos # PermitTTY no
130 1.1 christos # ForceCommand cvs server
131