5695fbd39e
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
12 lines
334 B
Bash
Executable file
12 lines
334 B
Bash
Executable file
#!/bin/bash
|
|
# Save user SSH public key if available.
|
|
# XXX: Obviously not suitable for downloadable images.
|
|
|
|
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
|