Skip to content

setup-sshd, setup-user: follow openssh permission recommendations

From the OpenSSH man page:

~/.ssh/
...
There is no general requirement to keep the entire contents of this
directory secret, but the recommended permissions are
read/write/execute for the user, and not accessible by others.

~/.ssh/authorized_keys
...
This file is not highly sensitive, but the recommended permissions are
read/write for the user, and not accessible by others.

OpenSSH follows these recommendations when creating these files itself so we should do the same.

Merge request reports