]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ssh/templates/sshd_config.erb
e1b4b3cc5927191c24a21ad6e996a12a63988919
[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 "ravel.debian.org" then "Port 443"
13                         when "paradis.debian.org" then "
14 ListenAddress 0.0.0.0:22
15 ListenAddress [::]:22
16 ListenAddress 5.153.231.31:443
17 ListenAddress [2001:41c8:1000:21::21:31]:443
18 "
19                  end
20 extraports
21 %>
22 # Use these options to restrict which interfaces/protocols sshd will bind to
23 #ListenAddress ::
24 #ListenAddress 0.0.0.0
25 Protocol 2
26 # HostKeys for protocol version 2
27 HostKey /etc/ssh/ssh_host_rsa_key
28 <%- if has_variable?("has_etc_ssh_ssh_host_ed25519_key") && has_etc_ssh_ssh_host_ed25519_key == "true" -%>
29 HostKey /etc/ssh/ssh_host_ed25519_key
30 <% end %>
31 #Privilege Separation is turned on for security
32 UsePrivilegeSeparation yes
33
34 # Lifetime and size of ephemeral version 1 server key
35 KeyRegenerationInterval 3600
36 ServerKeyBits 1024
37
38 # Logging
39 SyslogFacility AUTH
40 LogLevel INFO
41
42 # Authentication:
43 LoginGraceTime 120
44 PermitRootLogin without-password
45 StrictModes yes
46
47 RSAAuthentication yes
48 PubkeyAuthentication yes
49
50 # Don't read the user's ~/.rhosts and ~/.shosts files
51 IgnoreRhosts yes
52 # For this to work you will also need host keys in /etc/ssh_known_hosts
53 RhostsRSAAuthentication no
54 # similar for protocol version 2
55 HostbasedAuthentication no
56 # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
57 #IgnoreUserKnownHosts yes
58
59 # To enable empty passwords, change to yes (NOT RECOMMENDED)
60 PermitEmptyPasswords no
61
62 # Change to yes to enable challenge-response passwords (beware issues with
63 # some PAM modules and threads)
64 ChallengeResponseAuthentication no
65
66 # Kerberos options
67 #KerberosAuthentication no
68 #KerberosGetAFSToken no
69 #KerberosOrLocalPasswd yes
70 #KerberosTicketCleanup yes
71
72 # GSSAPI options
73 #GSSAPIAuthentication no
74 #GSSAPICleanupCredentials yes
75
76 X11Forwarding no
77 X11DisplayOffset 10
78 PrintMotd no
79 PrintLastLog yes
80 TCPKeepAlive yes
81 #UseLogin no
82
83 #MaxStartups 10:30:60
84 #Banner /etc/issue.net
85
86 # Allow client to pass locale environment variables
87 AcceptEnv LANG LC_*
88
89 Subsystem sftp /usr/lib/openssh/sftp-server
90
91 UsePAM yes
92 <% if %w{squeeze}.include?(scope.lookupvar('::lsbdistcodename')) %>
93 AuthorizedKeysFile /etc/ssh/userkeys/%u
94 AuthorizedKeysFile2 /var/lib/misc/userkeys/%u
95 <% else %>
96 AuthorizedKeysFile /etc/ssh/userkeys/%u /var/lib/misc/userkeys/%u /etc/ssh/userkeys/%u.more
97 <% end %>
98 PasswordAuthentication no