Do limit group sftponly to sftp
[mirror/dsa-puppet.git] / modules / ssh / templates / sshd_config.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5
6 # Package generated configuration file
7 # See the sshd(8) manpage for details
8
9 # What ports, IPs and protocols we listen for
10 Port 22
11 <%= extraports = case @fqdn
12                         when "paradis.debian.org" then "
13 ListenAddress 0.0.0.0:22
14 ListenAddress [::]:22
15 ListenAddress 5.153.231.31:443
16 ListenAddress [2001:41c8:1000:21::21:31]:443
17 "
18                  end
19 extraports
20 %>
21 # Use these options to restrict which interfaces/protocols sshd will bind to
22 #ListenAddress ::
23 #ListenAddress 0.0.0.0
24 Protocol 2
25 # HostKeys for protocol version 2
26 HostKey /etc/ssh/ssh_host_rsa_key
27 <%- if has_variable?("has_etc_ssh_ssh_host_ed25519_key") && @has_etc_ssh_ssh_host_ed25519_key -%>
28 HostKey /etc/ssh/ssh_host_ed25519_key
29 <% end %>
30 #Privilege Separation is turned on for security
31 UsePrivilegeSeparation yes
32
33 # Logging
34 SyslogFacility AUTH
35 LogLevel INFO
36
37 # Authentication:
38 LoginGraceTime 120
39 PermitRootLogin without-password
40 StrictModes yes
41
42 PubkeyAuthentication yes
43
44 # Don't read the user's ~/.rhosts and ~/.shosts files
45 IgnoreRhosts yes
46 # For this to work you will also need host keys in /etc/ssh_known_hosts
47 HostbasedAuthentication no
48 # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
49 #IgnoreUserKnownHosts yes
50
51 # To enable empty passwords, change to yes (NOT RECOMMENDED)
52 PermitEmptyPasswords no
53
54 # Change to yes to enable challenge-response passwords (beware issues with
55 # some PAM modules and threads)
56 ChallengeResponseAuthentication no
57
58 # Kerberos options
59 #KerberosAuthentication no
60 #KerberosGetAFSToken no
61 #KerberosOrLocalPasswd yes
62 #KerberosTicketCleanup yes
63
64 # GSSAPI options
65 #GSSAPIAuthentication no
66 #GSSAPICleanupCredentials yes
67
68 X11Forwarding no
69 X11DisplayOffset 10
70 PrintMotd no
71 PrintLastLog yes
72 TCPKeepAlive yes
73 #UseLogin no
74
75 #MaxStartups 10:30:60
76 #Banner /etc/issue.net
77
78 # Allow client to pass locale environment variables
79 AcceptEnv LANG LC_*
80
81 Subsystem sftp /usr/lib/openssh/sftp-server
82
83 UsePAM yes
84
85 AuthorizedKeysFile /etc/ssh/userkeys/%u /var/lib/misc/userkeys/%u /etc/ssh/userkeys/%u.more
86
87 PasswordAuthentication no
88
89 Match Group sftponly
90   AllowStreamLocalForwarding no
91   AllowTCPForwarding no
92   X11Forwarding no
93   ForceCommand internal-sftp