summaryrefslogtreecommitdiffstats
path: root/nixos/modules/virtualisation/ec2-data.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/virtualisation/ec2-data.nix')
-rw-r--r--nixos/modules/virtualisation/ec2-data.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/ec2-data.nix b/nixos/modules/virtualisation/ec2-data.nix
index 93a83a3e42af..15114b1e76ac 100644
--- a/nixos/modules/virtualisation/ec2-data.nix
+++ b/nixos/modules/virtualisation/ec2-data.nix
@@ -44,7 +44,7 @@ with lib;
# into the image (a Nova feature).
if ! [ -e /root/.ssh/authorized_keys ]; then
echo "obtaining SSH key..."
- mkdir -p /root/.ssh
+ mkdir -m 0700 -p /root/.ssh
$wget http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key > /root/key.pub
if [ $? -eq 0 -a -e /root/key.pub ]; then
if ! grep -q -f /root/key.pub /root/.ssh/authorized_keys; then