diff --git a/base/etc/one-context.d/02-ssh_public_key b/base/etc/one-context.d/02-ssh_public_key index 2057636..3c8edbb 100755 --- a/base/etc/one-context.d/02-ssh_public_key +++ b/base/etc/one-context.d/02-ssh_public_key @@ -26,6 +26,8 @@ function add_keys { [ -z "${SSH_PUBLIC_KEY}${EC2_PUBLIC_KEY}" ] && exit 0 +[ ! -f /root/.ssh/authorized_keys ] && touch /root/.ssh/authorized_keys + mkdir -m0700 -p /root/.ssh if [ -n "$SSH_PUBLIC_KEY" ]; then