diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-08-29 21:03:22 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-08-29 21:03:22 +0000 |
commit | 4963f769d91461e250a720c8ba89d3571b91b8c1 (patch) | |
tree | 339fc0db65ff41c0697cb47e97178bf7f6782e82 /modules | |
parent | 597e083d82741781dbb25cba6ef34dff9ab21096 (diff) | |
download | nixlib-4963f769d91461e250a720c8ba89d3571b91b8c1.tar nixlib-4963f769d91461e250a720c8ba89d3571b91b8c1.tar.gz nixlib-4963f769d91461e250a720c8ba89d3571b91b8c1.tar.bz2 nixlib-4963f769d91461e250a720c8ba89d3571b91b8c1.tar.lz nixlib-4963f769d91461e250a720c8ba89d3571b91b8c1.tar.xz nixlib-4963f769d91461e250a720c8ba89d3571b91b8c1.tar.zst nixlib-4963f769d91461e250a720c8ba89d3571b91b8c1.zip |
* Print the host public key on the console so that the user can obtain
it securely by parsing the output of ec2-get-console-output. svn path=/nixos/trunk/; revision=23524
Diffstat (limited to 'modules')
-rw-r--r-- | modules/virtualisation/amazon-image.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/virtualisation/amazon-image.nix b/modules/virtualisation/amazon-image.nix index 7a37a74dc691..a81f40cc759e 100644 --- a/modules/virtualisation/amazon-image.nix +++ b/modules/virtualisation/amazon-image.nix @@ -108,6 +108,13 @@ with pkgs.lib; rm -f /root/key.pub fi + # Print the host public key on the console so that the user + # can obtain it securely by parsing the output of + # ec2-get-console-output. + echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----" > /dev/console + ${pkgs.openssh}/bin/ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key.pub > /dev/console + echo "-----END SSH HOST KEY FINGERPRINTS-----" > /dev/console + echo "setting host name..." ${pkgs.nettools}/bin/hostname $(${pkgs.curl}/bin/curl http://169.254.169.254/1.0/meta-data/hostname) ''; |