From 5695fbd39e49b2bb291e472d52d2a2852d0b0ad4 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 24 May 2013 12:01:57 +1200 Subject: [PATCH] Set correct mode for .ssh/authorized_keys files. Per bug 1182648 we were not setting the mode and as a result couldn't log in, defeating the purpose of having a local-config element :). Change-Id: I4114b9536392f1517eac8f4bbe6f4b60ce1186a1 --- elements/local-config/install.d/62-ssh-key | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elements/local-config/install.d/62-ssh-key b/elements/local-config/install.d/62-ssh-key index 9e34f23d..544162ec 100755 --- a/elements/local-config/install.d/62-ssh-key +++ b/elements/local-config/install.d/62-ssh-key @@ -7,4 +7,6 @@ set -e if [ -e "/tmp/in_target.d/ssh-authorized-keys" ]; then mkdir -p /root/.ssh cat /tmp/in_target.d/ssh-authorized-keys >> /root/.ssh/authorized_keys + chmod 0700 /root/.ssh + chmod 0600 /root/.ssh/authorized_keys fi