2 ms·
The .ssh directory and its contents must be non-writable by anyone but the user. That means the group must not have write access, even if the user is the only p
by mnw21cam 9y ago
The .ssh directory and its contents must be non-writable by anyone but the user. That means the group must not have write access, even if the user is the only person in the group. Commonly, there is a group for each user with the same name, so the "fred" user will have a "fred" group with only the "fred" user being a member. This group mustn't have write access. Also, private keys must be unreadable by anyone but the user. You don't need to make the files immutable.
- agentgt 9y agoIt wasn't chattr. It was this problem with SELinux: https://stackoverflow.com/a/21636460/318174 https://stackoverflow.com/a/21636460/318174 restorecon -R -v /root/.ssh I was confused because I have used chattr with ssh files before just for added security. My memory was also hazy because I don't know much about SELinux. Hopefully I didn't misguide anyone.