diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-24 10:36:50 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-24 11:49:18 +0200 |
commit | e73b19ae4e984f58cebe4dd4f82cda622da552ab (patch) | |
tree | 2a240d92dd11fd40cdeec0e6735846b42189624e /nixos/modules/virtualisation/ec2-data.nix | |
parent | 5ab7a37febe3acce36bf659bbbc430fb572c73d8 (diff) | |
download | nixlib-e73b19ae4e984f58cebe4dd4f82cda622da552ab.tar nixlib-e73b19ae4e984f58cebe4dd4f82cda622da552ab.tar.gz nixlib-e73b19ae4e984f58cebe4dd4f82cda622da552ab.tar.bz2 nixlib-e73b19ae4e984f58cebe4dd4f82cda622da552ab.tar.lz nixlib-e73b19ae4e984f58cebe4dd4f82cda622da552ab.tar.xz nixlib-e73b19ae4e984f58cebe4dd4f82cda622da552ab.tar.zst nixlib-e73b19ae4e984f58cebe4dd4f82cda622da552ab.zip |
ec2-data.nix: Print all SSH host keys
Also, don't barf if there is no DSA key.
Diffstat (limited to 'nixos/modules/virtualisation/ec2-data.nix')
-rw-r--r-- | nixos/modules/virtualisation/ec2-data.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/ec2-data.nix b/nixos/modules/virtualisation/ec2-data.nix index 0b0fdda49888..91f4774cdc26 100644 --- a/nixos/modules/virtualisation/ec2-data.nix +++ b/nixos/modules/virtualisation/ec2-data.nix @@ -80,8 +80,9 @@ with lib; # can obtain it securely by parsing the output of # ec2-get-console-output. echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----" > /dev/console - ${config.programs.ssh.package}/bin/ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key.pub > /dev/console - ${config.programs.ssh.package}/bin/ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub > /dev/console + for i in /etc/ssh/ssh_host_*_key.pub; do + ${config.programs.ssh.package}/bin/ssh-keygen -l -f $i > /dev/console + done echo "-----END SSH HOST KEY FINGERPRINTS-----" > /dev/console ''; serviceConfig.Type = "oneshot"; |