nixos-container: Fix show-host-key
We don't generate ecdsa keys by default anymore, so print ed25519 instead if available.
This commit is contained in:
parent
f36ea29b85
commit
c904dfa87c
@ -290,7 +290,8 @@ elsif ($action eq "show-ip") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
elsif ($action eq "show-host-key") {
|
elsif ($action eq "show-host-key") {
|
||||||
my $fn = "$root/etc/ssh/ssh_host_ecdsa_key.pub";
|
my $fn = "$root/etc/ssh/ssh_host_ed25519_key.pub";
|
||||||
|
$fn = "$root/etc/ssh/ssh_host_ecdsa_key.pub" unless -e $fn;
|
||||||
exit 1 if ! -f $fn;
|
exit 1 if ! -f $fn;
|
||||||
print read_file($fn);
|
print read_file($fn);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user