3 ms·
ChallengeResponseAuthentication no # \ PasswordAuthentication no # | nukes "Password: " UsePAM no # / PermitRootLogin no
by exikyut 8y ago
ChallengeResponseAuthentication no # \
PasswordAuthentication no # | nukes "Password: "
UsePAM no # /
PermitRootLogin no # (duh)
PubkeyAuthentication yes # enables public keys; very important
AllowUsers user1 user2 # maybe? combine with an obscure username...
- simias 8y agoIf you're doing admin on the machine you might not want to disallow root login.
- protomyth 8y agoUse sudo or doas.
- exikyut 8y agoI once set up a Slackware-based recovery partition on a USB HDD, and configured it so I could SSH to the machine, as root, with no password. (Took a bit of doing, too. OpenSSH is well built.) This HDD was only ever used for recovery. Incidentally I only ever used it at home, on a LAN that only has devices I know about on it. In a work environment I'd only ever do the same running off an isolated lab switch. But in certain situations, "login to the box as root w/ no pw" is awesome for rapid bringup/diagnosis/repair/whatever.