aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2014-11-21 18:19:07 -0500
committerMicah Anderson <micah@riseup.net>2014-11-21 21:20:29 -0500
commitd78749fd8f9ae2482b8e31c74698362c5c1f2341 (patch)
treebe006349425e323811b541893ac1cbc04bf312e5 /manifests
parent03751baf8e426ea45c47167357ec0f9278134a8e (diff)
downloadpuppet-sshd-d78749fd8f9ae2482b8e31c74698362c5c1f2341.tar.gz
puppet-sshd-d78749fd8f9ae2482b8e31c74698362c5c1f2341.tar.bz2
Add a $hostkey_type variable that allows you to set which hostkey
types you want to support in your sshd_config. We use the ssh_version fact to determine the default hostkey types. Only enable rsa and ed25519 for ssh versions greater or equal to 6.5, otherwise enable rsa and dsa. Some distributions, such as debian, also enable ecdsa as a hostkey type, but this is a known bad NIST curve, so we do not enable that by default (thus deviating from the stock sshd config)
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp4
1 files changed, 4 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 5a38293..2455887 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -49,6 +49,10 @@ class sshd(
$shorewall_source = 'net',
$sshkey_ipaddress = $::ipaddress,
$manage_client = true,
+ $hostkey_type = versioncmp($::ssh_version, '6.5') ? {
+ /(^1|0)/ => [ 'rsa', 'ed25519' ],
+ /-1/ => [ 'rsa', 'dsa' ]
+ }
) {
validate_bool($manage_shorewall)