# sshd_agent_forwarding: If you want to allow ssh-agent forwarding
# Valid Values: yes or no
# Default: no
+#
+# sshd_pubkey_authentication: If you want to enable public key authentication
+# Valid Values: yes or no
+# Default: yes
class sshd {
include sshd::client
'' => 'no',
default => $sshd_challenge_response_authentication
}
+ $real_sshd_pubkey_authentication = $sshd_pubkey_authentication ? {
+ '' => 'no',
+ default => $sshd_pubkey_authentication
+ }
file { 'sshd_config':
path => '/etc/ssh/sshd_config',
#MaxAuthTries 6
#RSAAuthentication yes
-#PubkeyAuthentication yes
+<%- if real_sshd_sshd_pubkey_authentication.to_s == 'yes' then %>
+PubkeyAuthentication yes
+<%- else %>
+PubkeyAuthentication no
+<%- end %>
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
StrictModes yes
RSAAuthentication yes
+<%- if real_sshd_sshd_pubkey_authentication.to_s == 'yes' then %>
PubkeyAuthentication yes
+<%- else %>
+PubkeyAuthentication no
+<%- end %>
+
#AuthorizedKeysFile %h/.ssh/authorized_keys
# rhosts authentication should not be used
#MaxAuthTries 6
#RSAAuthentication yes
-#PubkeyAuthentication yes
+<%- if real_sshd_sshd_pubkey_authentication.to_s == 'yes' then %>
+PubkeyAuthentication yes
+<%- else %>
+PubkeyAuthentication no
+<%- end %>
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#MaxAuthTries 6
#RSAAuthentication yes
-#PubkeyAuthentication yes
+<%- if real_sshd_sshd_pubkey_authentication.to_s == 'yes' then %>
+PubkeyAuthentication yes
+<%- else %>
+PubkeyAuthentication no
+<%- end %>
+
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts