OpenSSH 8.0 released
OpenSSH 8.0 released
Posted Apr 30, 2019 7:01 UTC (Tue) by mbunkus (subscriber, #87248)In reply to: OpenSSH 8.0 released by ScottMinster
Parent article: OpenSSH 8.0 released
If you're disallowing root login via ssh, you're doing it for security purposes, and by allowing passwordless sudo to such commands you completely counteract those security purposes. You'd have to handle the security for that account the same way you're handling it for root: disallow login via ssh completely. Or to frame it differently: if you enable passwordless sudo rsync, you could just as well re-enable root login via ssh (with public keys, please!) as it would be less hassle and no less secure.
For my own machines I generally disable ssh root login for unknown addresses and often allow it for known-good addresses using "Match" blocks in sshd_config, e.g.
PermitRootLogin no
Match Address 2001:db8::/64
PermitRootLogin prohibit-password
