sshd_config revision 1.30 1 # $NetBSD: sshd_config,v 1.30 2026/06/30 04:13:47 riastradh Exp $
2 # $OpenBSD: sshd_config,v 1.105 2024/12/03 14:12:47 dtucker Exp $
3
4 # This is the sshd server system-wide configuration file. See
5 # sshd_config(5) for more information.
6
7 # The strategy used for options in the default sshd_config shipped with
8 # OpenSSH is to specify options with their default value where
9 # possible, but leave them commented. Uncommented options override the
10 # default value.
11
12 #Port 22
13 #AddressFamily any
14 #ListenAddress 0.0.0.0
15 #ListenAddress ::
16
17 #HostKey /etc/ssh/ssh_host_rsa_key
18 #HostKey /etc/ssh/ssh_host_ecdsa_key
19 #HostKey /etc/ssh/ssh_host_ed25519_key
20
21 # Ciphers and keying
22 #RekeyLimit default none
23
24 # Logging
25 #SyslogFacility AUTH
26 #LogLevel INFO
27
28 # Authentication:
29
30 # For slow CPUs, bumped from 2 minutes to 10
31 LoginGraceTime 600
32 #PermitRootLogin prohibit-password
33 #StrictModes yes
34 #MaxAuthTries 6
35 #MaxSessions 10
36
37 #PubkeyAuthentication yes
38
39 # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
40 # but this is overridden so installations will only check .ssh/authorized_keys
41 AuthorizedKeysFile .ssh/authorized_keys
42
43 #AuthorizedPrincipalsFile none
44
45 #AuthorizedKeysCommand none
46 #AuthorizedKeysCommandUser nobody
47
48 # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
49 #HostbasedAuthentication no
50 # Change to yes if you don't trust ~/.ssh/known_hosts for
51 # HostbasedAuthentication
52 #IgnoreUserKnownHosts no
53 # Don't read the user's ~/.rhosts and ~/.shosts files
54 #IgnoreRhosts yes
55
56 # To disable password authentication, you must BOTH
57 # (a) set PasswordAuthentication to "no", AND
58 # (b) set KbdInteractiveAuthentication to "no", or set UsePAM to "no",
59 # or disable all password-based auth modules in /etc/pam.d/sshd.
60 # Alternatively, you can configure AuthenticationMethods with a
61 # specific list of methods excluding "password" and
62 # "keyboard-interactive".
63 #PasswordAuthentication yes
64 #PermitEmptyPasswords no
65
66 # Change to "no" to disable keyboard-interactive authentication. Depending on
67 # the system's configuration, this may involve passwords, challenge-response,
68 # one-time passwords or some combination of these and other methods.
69 #KbdInteractiveAuthentication yes
70
71 # Kerberos options
72 #KerberosAuthentication no
73 #KerberosOrLocalPasswd yes
74 #KerberosTicketCleanup yes
75 #KerberosGetAFSToken no
76
77 # GSSAPI options
78 #GSSAPIAuthentication no
79 #GSSAPICleanupCredentials yes
80
81 # Set this to 'yes' to enable PAM authentication, account processing,
82 # and session processing. If this is enabled, PAM authentication will
83 # be allowed through the KbdInteractiveAuthentication and
84 # PasswordAuthentication settings. Depending on your PAM configuration,
85 # PAM authentication via KbdInteractiveAuthentication may bypass
86 # the setting of "PermitRootLogin without-password".
87 # If you just want the PAM account and session checks to run without
88 # PAM authentication, then enable this but set PasswordAuthentication
89 # and KbdInteractiveAuthentication to 'no'.
90 UsePAM yes
91
92 #AllowAgentForwarding yes
93 #AllowTcpForwarding yes
94 #GatewayPorts no
95 #X11Forwarding no
96 # If you use xorg from pkgsrc then uncomment the following line.
97 #XAuthLocation /usr/pkg/bin/xauth
98 #X11DisplayOffset 10
99 #X11UseLocalhost yes
100 #PermitTTY yes
101 #PrintMotd yes
102 #PrintLastLog yes
103 #TCPKeepAlive yes
104 #PermitUserEnvironment no
105 #Compression delayed
106 #ClientAliveInterval 0
107 #ClientAliveCountMax 3
108 #UseDNS no
109 #PidFile /var/run/sshd.pid
110 #MaxStartups 10:30:100
111 #PermitTunnel no
112 #ChrootDirectory none
113 #VersionAddendum none
114
115 # no default banner path
116 #Banner none
117
118 # here are the new patched ldap related tokens
119 # entries in your LDAP must have posixAccount & ldapPublicKey objectclass
120 #UseLPK yes
121 #LpkLdapConf /etc/ldap.conf
122 #LpkServers ldap://10.1.7.1/ ldap://10.1.7.2/
123 #LpkUserDN ou=users,dc=phear,dc=org
124 #LpkGroupDN ou=groups,dc=phear,dc=org
125 #LpkBindDN cn=Manager,dc=phear,dc=org
126 #LpkBindPw secret
127 #LpkServerGroup mail
128 #LpkFilter (hostAccess=master.phear.org)
129 #LpkForceTLS no
130 #LpkSearchTimelimit 3
131 #LpkBindTimelimit 3
132 #LpkPubKeyAttr sshPublicKey
133
134 # override default of no subsystems
135 Subsystem sftp /usr/libexec/sftp-server
136
137 # the following are HPN related configuration options
138 # tcp receive buffer polling. disable in non autotuning kernels
139 #TcpRcvBufPoll yes
140
141 # allow the use of the none cipher
142 #NoneEnabled no
143
144 # disable hpn performance boosts.
145 HPNDisabled yes
146
147 # buffer size for hpn to non-hpn connections
148 #HPNBufferSize 2048
149
150 # Example of overriding settings on a per-user basis
151 #Match User anoncvs
152 # X11Forwarding no
153 # AllowTcpForwarding no
154 # PermitTTY no
155 # ForceCommand cvs server
156