192 |
- |
1 |
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
|
|
|
2 |
|
|
|
3 |
# This is the sshd server system-wide configuration file. See
|
|
|
4 |
# sshd_config(5) for more information.
|
|
|
5 |
|
|
|
6 |
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
|
|
|
7 |
|
|
|
8 |
# The strategy used for options in the default sshd_config shipped with
|
|
|
9 |
# OpenSSH is to specify options with their default value where
|
|
|
10 |
# possible, but leave them commented. Uncommented options override the
|
|
|
11 |
# default value.
|
|
|
12 |
|
|
|
13 |
# If you want to change the port on a SELinux system, you have to tell
|
|
|
14 |
# SELinux about this change.
|
|
|
15 |
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
|
|
|
16 |
#
|
|
|
17 |
#Port 22
|
|
|
18 |
#AddressFamily any
|
|
|
19 |
#ListenAddress 0.0.0.0
|
|
|
20 |
#ListenAddress ::
|
|
|
21 |
|
|
|
22 |
HostKey /etc/ssh/ssh_host_rsa_key
|
|
|
23 |
HostKey /etc/ssh/ssh_host_ecdsa_key
|
|
|
24 |
HostKey /etc/ssh/ssh_host_ed25519_key
|
|
|
25 |
|
|
|
26 |
# Ciphers and keying
|
|
|
27 |
#RekeyLimit default none
|
|
|
28 |
|
|
|
29 |
# This system is following system-wide crypto policy. The changes to
|
|
|
30 |
# crypto properties (Ciphers, MACs, ...) will not have any effect here.
|
|
|
31 |
# They will be overridden by command-line options passed to the server
|
|
|
32 |
# on command line.
|
|
|
33 |
# Please, check manual pages for update-crypto-policies(8) and sshd_config(5).
|
|
|
34 |
|
|
|
35 |
# Logging
|
|
|
36 |
#SyslogFacility AUTH
|
|
|
37 |
SyslogFacility AUTHPRIV
|
|
|
38 |
#LogLevel INFO
|
|
|
39 |
|
|
|
40 |
# Authentication:
|
|
|
41 |
|
|
|
42 |
#LoginGraceTime 2m
|
|
|
43 |
PermitRootLogin yes
|
|
|
44 |
#StrictModes yes
|
|
|
45 |
#MaxAuthTries 6
|
|
|
46 |
#MaxSessions 10
|
|
|
47 |
|
|
|
48 |
#PubkeyAuthentication yes
|
|
|
49 |
|
|
|
50 |
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
|
|
|
51 |
# but this is overridden so installations will only check .ssh/authorized_keys
|
|
|
52 |
AuthorizedKeysFile .ssh/authorized_keys
|
|
|
53 |
|
|
|
54 |
#AuthorizedPrincipalsFile none
|
|
|
55 |
|
|
|
56 |
#AuthorizedKeysCommand none
|
|
|
57 |
#AuthorizedKeysCommandUser nobody
|
|
|
58 |
|
|
|
59 |
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
|
|
|
60 |
#HostbasedAuthentication no
|
|
|
61 |
# Change to yes if you don't trust ~/.ssh/known_hosts for
|
|
|
62 |
# HostbasedAuthentication
|
|
|
63 |
#IgnoreUserKnownHosts no
|
|
|
64 |
# Don't read the user's ~/.rhosts and ~/.shosts files
|
|
|
65 |
#IgnoreRhosts yes
|
|
|
66 |
|
|
|
67 |
# To disable tunneled clear text passwords, change to no here!
|
|
|
68 |
#PasswordAuthentication yes
|
|
|
69 |
#PermitEmptyPasswords no
|
|
|
70 |
PasswordAuthentication yes
|
|
|
71 |
|
|
|
72 |
# Change to no to disable s/key passwords
|
|
|
73 |
#ChallengeResponseAuthentication yes
|
|
|
74 |
ChallengeResponseAuthentication no
|
|
|
75 |
|
|
|
76 |
# Kerberos options
|
|
|
77 |
#KerberosAuthentication no
|
|
|
78 |
#KerberosOrLocalPasswd yes
|
|
|
79 |
#KerberosTicketCleanup yes
|
|
|
80 |
#KerberosGetAFSToken no
|
|
|
81 |
#KerberosUseKuserok yes
|
|
|
82 |
|
|
|
83 |
# GSSAPI options
|
|
|
84 |
GSSAPIAuthentication yes
|
|
|
85 |
GSSAPICleanupCredentials no
|
|
|
86 |
#GSSAPIStrictAcceptorCheck yes
|
|
|
87 |
#GSSAPIKeyExchange no
|
|
|
88 |
#GSSAPIEnablek5users no
|
|
|
89 |
|
|
|
90 |
# Set this to 'yes' to enable PAM authentication, account processing,
|
|
|
91 |
# and session processing. If this is enabled, PAM authentication will
|
|
|
92 |
# be allowed through the ChallengeResponseAuthentication and
|
|
|
93 |
# PasswordAuthentication. Depending on your PAM configuration,
|
|
|
94 |
# PAM authentication via ChallengeResponseAuthentication may bypass
|
|
|
95 |
# the setting of "PermitRootLogin without-password".
|
|
|
96 |
# If you just want the PAM account and session checks to run without
|
|
|
97 |
# PAM authentication, then enable this but set PasswordAuthentication
|
|
|
98 |
# and ChallengeResponseAuthentication to 'no'.
|
|
|
99 |
# WARNING: 'UsePAM no' is not supported in Fedora and may cause several
|
|
|
100 |
# problems.
|
|
|
101 |
UsePAM yes
|
|
|
102 |
|
|
|
103 |
#AllowAgentForwarding yes
|
|
|
104 |
#AllowTcpForwarding yes
|
|
|
105 |
#GatewayPorts no
|
|
|
106 |
X11Forwarding yes
|
|
|
107 |
#X11DisplayOffset 10
|
|
|
108 |
#X11UseLocalhost yes
|
|
|
109 |
#PermitTTY yes
|
|
|
110 |
|
|
|
111 |
# It is recommended to use pam_motd in /etc/pam.d/sshd instead of PrintMotd,
|
|
|
112 |
# as it is more configurable and versatile than the built-in version.
|
|
|
113 |
PrintMotd no
|
|
|
114 |
|
|
|
115 |
#PrintLastLog yes
|
|
|
116 |
#TCPKeepAlive yes
|
|
|
117 |
#PermitUserEnvironment no
|
|
|
118 |
#Compression delayed
|
|
|
119 |
#ClientAliveInterval 0
|
|
|
120 |
#ClientAliveCountMax 3
|
|
|
121 |
#UseDNS no
|
|
|
122 |
#PidFile /var/run/sshd.pid
|
|
|
123 |
#MaxStartups 10:30:100
|
|
|
124 |
#PermitTunnel no
|
|
|
125 |
#ChrootDirectory none
|
|
|
126 |
#VersionAddendum none
|
|
|
127 |
|
|
|
128 |
# no default banner path
|
|
|
129 |
#Banner none
|
|
|
130 |
|
|
|
131 |
# Accept locale-related environment variables
|
|
|
132 |
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
|
|
|
133 |
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
|
|
|
134 |
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
|
|
|
135 |
AcceptEnv XMODIFIERS
|
|
|
136 |
|
|
|
137 |
# override default of no subsystems
|
|
|
138 |
Subsystem sftp /usr/libexec/openssh/sftp-server
|
|
|
139 |
|
|
|
140 |
# Example of overriding settings on a per-user basis
|
|
|
141 |
#Match User anoncvs
|
|
|
142 |
# X11Forwarding no
|
|
|
143 |
# AllowTcpForwarding no
|
|
|
144 |
# PermitTTY no
|
|
|
145 |
# ForceCommand cvs server
|