]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - sshd_config
dbb774eb7151bf57580af68076a1764488be0bbf
[config/dotfiles.git] / 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-2014  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 # Use privilege separation for increased security. "sandbox" applies
29 # additional restrictions on the unprivileged process.
30 UsePrivilegeSeparation sandbox
31
32 # Don't use PAM because it may circumvent other authentication methods used
33 # below (default).
34 UsePAM no
35 # Disable authentication methods I don't use.
36 ChallengeResponseAuthentication no
37 GSSAPIAuthentication no
38 HostbasedAuthentication no
39 KerberosAuthentication no
40 PasswordAuthentication no
41 # Only enable those I need.
42 PubkeyAuthentication yes
43
44 # Don't allow empty passwords (default).
45 PermitEmptyPasswords no
46 # Allow root-login only with public keys.
47 PermitRootLogin without-password
48
49 # Be strict when checking user file permissions (default).
50 StrictModes yes
51
52 # Allow more sessions per network connection (e.g. from ControlMaster/-M).
53 # When not enough sessions are available this message is sent by ssh:
54 # "mux_client_request_session: session request failed: Session open refused by
55 # peer".
56 MaxSessions 30
57
58 # Don't accept any environment variables from the client (default).
59 AcceptEnv
60 # Don't use ~/.ssh/environment and environment= options in
61 # ~/.ssh/authorized_keys because LD_PRELOAD could be used to circumvent
62 # authentications (default).
63 PermitUserEnvironment no
64
65 # Send a message after the given seconds of inactivity through the encrypted
66 # channel. Used to detect stale connections more quickly. Not necessary on all
67 # servers.
68 #ClientAliveInterval 60
69 # Disconnect the client if more than max count alive messages were lost
70 # (default). With the setting above this detects a broken connection after 3
71 # minutes.
72 ClientAliveCountMax 3
73
74 # Enable sftp (and sshfs) usage. internal-sftp also works in chroots.
75 Subsystem sftp internal-sftp
76
77
78 # Only allow logins for certain users.
79 AllowUsers root