From de41002518011b9fbc69d85db791db46cfcc44b2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 23 Aug 2014 14:02:14 -0300 Subject: Exporting ECDSA host key --- manifests/base.pp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/manifests/base.pp b/manifests/base.pp index 4001985..bb46f05 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -13,21 +13,36 @@ class sshd::base { case $::sshrsakey { '': { info("no sshrsakey on ${::fqdn}") } default: { - @@sshkey{$::fqdn: + @@sshkey{ "${::fqdn}-rsa": tag => "fqdn", type => ssh-rsa, key => $::sshrsakey, ensure => present, } + + @@sshkey{ "${::fqdn}-ecdsa": + tag => "fqdn", + type => ecdsa-sha2-nistp256, + key => $::sshecdsakey, + ensure => present, + } + # In case the node has uses a shared network address, # we don't define a sshkey resource using an IP address if $sshd::shared_ip == "no" { - @@sshkey{$::ipaddress: + @@sshkey{ "${::ipaddress}-rsa": tag => "ipaddress", type => ssh-rsa, key => $::sshrsakey, ensure => present, } + + @@sshkey{ "${::ipaddress}-ecdsa": + tag => "ipaddress", + type => ecdsa-sha2-nistp256, + key => $::sshecdsakey, + ensure => present, + } } } } -- cgit v1.2.3