mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
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") {
|
||||
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;
|
||||
print read_file($fn);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue