mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 00:12:58 +02:00
AWS: Give setup user permissions to read its own SSH keys
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -101,9 +101,11 @@ import_aws_configuration() {
|
||||
if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
|
||||
mkdir -p "/home/setup/.ssh"
|
||||
chmod 700 "/home/setup/.ssh"
|
||||
chown setup.nobody "/home/setup/.ssh"
|
||||
|
||||
echo "${key}" >> "/home/setup/.ssh/authorized_keys"
|
||||
chmod 600 "/home/setup/.ssh/authorized_keys"
|
||||
chown setup.nobody "/home/setup/.ssh/authorized_keys"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user