3 ms·
“If a user has root access via the certificate on a server” 1. If at all possible, avoid giving anybody (even yourself) root access. 2. You can move the autho
by Someone 6y ago
“If a user has root access via the certificate on a server”
1. If at all possible, avoid giving anybody (even yourself) root access.
2. You can move the authorized keys files to a different location. See https://serverfault.com/questions/313465/is-a-central-location-for-authorized-keys-a-good-idea https://serverfault.com/questions/313465/is-a-central-locati.... That’s not hacker-proof against users having root access, but will prevent users of good will from doing the wrong thing.
3. Depending on OS/file system, you may be able to make .ssh/authorized_keys immutable, even for root, on the server. For example, FreeBSD has the “system immutable” flag. Files with that flag set can only be modified after booting in single-user mode (https://www.techrepublic.com/blog/it-security/freebsd-file-flags-enhance-unix-filesystem-security/ https://www.techrepublic.com/blog/it-security/freebsd-file-f...)
- devnonymous 6y agoAlso, AuthorizedKeysFile may also be set to none to skip checking for user keys in files altogether! Or choose to disable keys based authentication if using certs. Or customize keys so that they get served from a db or some such, the only requirement for this is to write a script or binary. I linked to all of this in another reply and it was downvoted for some reason. Odd.