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