Move ServerKeyBits to 1024, the new default in jessie - this only affects version...
[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 "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 #Privilege Separation is turned on for security
29 UsePrivilegeSeparation yes
30
31 # Lifetime and size of ephemeral version 1 server key
32 KeyRegenerationInterval 3600
33 ServerKeyBits 1024
34
35 # Logging
36 SyslogFacility AUTH
37 LogLevel INFO
38
39 # Authentication:
40 LoginGraceTime 120
41 PermitRootLogin without-password
42 StrictModes yes
43
44 RSAAuthentication yes
45 PubkeyAuthentication yes
46
47 # Don't read the user's ~/.rhosts and ~/.shosts files
48 IgnoreRhosts yes
49 # For this to work you will also need host keys in /etc/ssh_known_hosts
50 RhostsRSAAuthentication no
51 # similar for protocol version 2
52 HostbasedAuthentication no
53 # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
54 #IgnoreUserKnownHosts yes
55
56 # To enable empty passwords, change to yes (NOT RECOMMENDED)
57 PermitEmptyPasswords no
58
59 # Change to yes to enable challenge-response passwords (beware issues with
60 # some PAM modules and threads)
61 ChallengeResponseAuthentication no
62
63 # Kerberos options
64 #KerberosAuthentication no
65 #KerberosGetAFSToken no
66 #KerberosOrLocalPasswd yes
67 #KerberosTicketCleanup yes
68
69 # GSSAPI options
70 #GSSAPIAuthentication no
71 #GSSAPICleanupCredentials yes
72
73 X11Forwarding no
74 X11DisplayOffset 10
75 PrintMotd no
76 PrintLastLog yes
77 TCPKeepAlive yes
78 #UseLogin no
79
80 #MaxStartups 10:30:60
81 #Banner /etc/issue.net
82
83 # Allow client to pass locale environment variables
84 AcceptEnv LANG LC_*
85
86 Subsystem sftp /usr/lib/openssh/sftp-server
87
88 UsePAM yes
89 <% if %w{squeeze}.include?(scope.lookupvar('::lsbdistcodename')) %>
90 AuthorizedKeysFile /etc/ssh/userkeys/%u
91 AuthorizedKeysFile2 /var/lib/misc/userkeys/%u
92 <% else %>
93 AuthorizedKeysFile /etc/ssh/userkeys/%u /var/lib/misc/userkeys/%u /etc/ssh/userkeys/%u.more
94 <% end %>
95 PasswordAuthentication no