2 ms·
sshd runs as root, so yes, it will be possible to login as any user -- the sshd daemon will be able to function. :-) The only files that would be appended to o
by herpderperator 6y ago
sshd runs as root, so yes, it will be possible to login as any user -- the sshd daemon will be able to function. :-)
The only files that would be appended to on user login (by sshd, which is running as root) would be /var/log/{utmp,wtmp,btmp} to record the login (in practice I've only seen wtmp). After that you have sshd logging (e.g. /var/log/{messages,syslog,auth.log}) which is picked up by syslog-ng or its equivalents, which also run as root.
Regarding not being able to login via SSH as root by default: the sshd_config default is actually `PermitRootLogin prohibit-password` which means you can login if you use public-key cryptography, it just won't allow you to login with the root password (even if it's correct.) It's good practice these days to use public keys for SSH anyway, so I wouldn't say this is much of a setback.
- nottorp 6y agoLogging in as the user loads the user's shell, shell config files etc. As that user. Only then you can go to being root... if you can. As for keys, they're fine if you only ever use the same machine. Which may not happen in an emergency.