diff options
author | Russell O'Connor <oconnorr@google.com> | 2014-12-29 18:08:57 -0500 |
---|---|---|
committer | Russell O'Connor <oconnorr@google.com> | 2015-01-05 15:20:55 -0500 |
commit | 3251948029aab3e268c081cb258a835711a86205 (patch) | |
tree | 172557a30380b1a3099bb5d5c125c4d0a548f88f /nixos/modules/virtualisation/google-compute-image.nix | |
parent | d1cbbff1e36e66dcf1aa9bb445fd03bc0c77433c (diff) | |
download | nixlib-3251948029aab3e268c081cb258a835711a86205.tar nixlib-3251948029aab3e268c081cb258a835711a86205.tar.gz nixlib-3251948029aab3e268c081cb258a835711a86205.tar.bz2 nixlib-3251948029aab3e268c081cb258a835711a86205.tar.lz nixlib-3251948029aab3e268c081cb258a835711a86205.tar.xz nixlib-3251948029aab3e268c081cb258a835711a86205.tar.zst nixlib-3251948029aab3e268c081cb258a835711a86205.zip |
Generate SSH host public key from the private key.
Diffstat (limited to 'nixos/modules/virtualisation/google-compute-image.nix')
-rw-r--r-- | nixos/modules/virtualisation/google-compute-image.nix | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix index f6830b2f09fe..bee64866b52b 100644 --- a/nixos/modules/virtualisation/google-compute-image.nix +++ b/nixos/modules/virtualisation/google-compute-image.nix @@ -158,13 +158,7 @@ in mv -f /root/ssh_host_ecdsa_key /etc/ssh/ssh_host_ecdsa_key echo "downloaded ssh_host_ecdsa_key" chmod 600 /etc/ssh/ssh_host_ecdsa_key - fi - - echo "obtaining SSH public host key..." - ${wget} -O /root/ssh_host_ecdsa_key.pub http://metadata/0.1/meta-data/attributes/ssh_host_ecdsa_key_pub - if [ $? -eq 0 -a -e /root/ssh_host_ecdsa_key.pub ]; then - mv -f /root/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_ecdsa_key.pub - echo "downloaded ssh_host_ecdsa_key.pub" + ${config.programs.ssh.package}/bin/ssh-keygen -y -f /etc/ssh/ssh_host_ecdsa_key > /etc/ssh/ssh_host_ecdsa_key.pub chmod 644 /etc/ssh/ssh_host_ecdsa_key.pub fi ''; |