]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - shell/sshd_config
shell: sshd_config: replace deprecated value "without-password"
[config/dotfiles.git] / shell / sshd_config
1 # SSH daemon configuration file.
2 #
3 # Some options are set even if they are default to document that they are
4 # important and to prevent upstream changes from affecting them.
5
6 # Copyright (C) 2013-2016  Simon Ruderich
7 #
8 # This file is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This file is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
20
21
22 # Listen on port 22 (default).
23 Port 22
24
25 # Only use protocol 2. Protocol 1 is insecure. (default)
26 Protocol 2
27
28 # Stronger algorithms. See ssh_config for details.
29 KexAlgorithms diffie-hellman-group16-sha512,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group18-sha512
30 Ciphers aes256-ctr
31 MACs hmac-sha2-512-etm@openssh.com
32 HostKeyAlgorithms rsa-sha2-512
33 PubkeyAcceptedKeyTypes -ssh-rsa,ssh-rsa-cert-v01@openssh.com,ssh-dss,ssh-dss-cert-v01@openssh.com
34
35 # Don't use PAM because it may circumvent other authentication methods used
36 # below (default).
37 UsePAM no
38 # Disable authentication methods I don't use.
39 ChallengeResponseAuthentication no
40 GSSAPIAuthentication no
41 HostbasedAuthentication no
42 KbdInteractiveAuthentication no
43 KerberosAuthentication no
44 PasswordAuthentication no
45 # Only enable those I need.
46 PubkeyAuthentication yes
47
48 # Don't allow empty passwords (default).
49 PermitEmptyPasswords no
50 # Allow root-login only with public keys (default).
51 PermitRootLogin prohibit-password
52
53 # Be strict when checking user file permissions (default).
54 StrictModes yes
55
56 # Allow more sessions per network connection (e.g. from ControlMaster/-M).
57 # When not enough sessions are available this message is sent by ssh:
58 # "mux_client_request_session: session request failed: Session open refused by
59 # peer".
60 MaxSessions 30
61
62 # Don't accept any environment variables from the client (default).
63 AcceptEnv
64 # Don't use ~/.ssh/environment and environment= options in
65 # ~/.ssh/authorized_keys because LD_PRELOAD could be used to circumvent
66 # authentications (default).
67 PermitUserEnvironment no
68
69 # Send a message after the given seconds of inactivity through the encrypted
70 # channel. Used to detect stale connections more quickly. Not necessary on all
71 # servers.
72 #ClientAliveInterval 60
73 # Disconnect the client if more than max count alive messages were lost
74 # (default). With the setting above this detects a broken connection after 3
75 # minutes.
76 ClientAliveCountMax 3
77
78 # Enable sftp (and sshfs) usage. internal-sftp also works in chroots.
79 Subsystem sftp internal-sftp
80
81 # Only allow logins for certain users.
82 AllowUsers root