diff --git a/xCAT-server/lib/xcat/plugins/credentials.pm b/xCAT-server/lib/xcat/plugins/credentials.pm index 1d266bf47..0e9a2b0e7 100644 --- a/xCAT-server/lib/xcat/plugins/credentials.pm +++ b/xCAT-server/lib/xcat/plugins/credentials.pm @@ -216,6 +216,17 @@ sub process_request xCAT::MsgUtils->trace(0, 'E', "credentials: Unable to read private ECDSA key"); next; } + } elsif ($parm =~ /ssh_ed25519_hostkey/) { + xCAT::MsgUtils->trace(0, 'I', "credentials: sending $parm to $client"); + if (-r "/etc/xcat/hostkeys/$client/ssh_host_ed25519_key") { + $tfilename = "/etc/xcat/hostkeys/$client/ssh_host_ed25519_key"; + } elsif (-r "/etc/xcat/hostkeys/ssh_host_ed25519_key") { + $tfilename = "/etc/xcat/hostkeys/ssh_host_ed25519_key"; + } else { + push @{ $rsp->{'error'} }, "Unable to read private ed25519 key from /etc/xcat/hostkeys"; + xCAT::MsgUtils->trace(0, 'E', "credentials: Unable to read private ed25519 key"); + next; + } } elsif ($parm =~ /xcat_cfgloc/) { xCAT::MsgUtils->trace(0, 'I', "credentials: sending $parm to $client"); unless (-r "/etc/xcat/cfgloc") {