Set same permissions for /root/.ssh/authorized_keys
in post-tasks.d/010fix-ssh-perms as is done by Puppet with sunet::ssh_keys.
This commit is contained in:
parent
d6f3c216cb
commit
5dd6ac57e2
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ if test -f /root/.ssh/authorized_keys; then
|
||||||
if test `stat -t /root/.ssh/authorized_keys | cut -d\ -f5` != 0; then
|
if test `stat -t /root/.ssh/authorized_keys | cut -d\ -f5` != 0; then
|
||||||
chown root.root /root/.ssh/authorized_keys
|
chown root.root /root/.ssh/authorized_keys
|
||||||
fi
|
fi
|
||||||
if test `stat --printf=%a /root/.ssh/authorized_keys` != 600; then
|
if test `stat --printf=%a /root/.ssh/authorized_keys` != 440; then
|
||||||
chmod 600 /root/.ssh/authorized_keys
|
chmod 440 /root/.ssh/authorized_keys
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue