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...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.
a) Why are you using bleeding edge software in production, and especially so unreleased versions of OpenSSH?
b) Why are your SSH servers exposed to public traffic?
c) User enumeration is useful for finding accounts with weak passwords. Why do you have personal accounts on prod servers? Why do you have _any_ accounts not using public key authentication at all?
> We believe that this issue warrants a CVE; it affects all operating systems, all OpenSSH versions (we went back as far as OpenSSH 2.3.0, released in November 2000), and is easier to exploit than previous OpenSSH username enumerations...
As for b) and c), I 100% agree.
In fact: if you're using KVM-based virtualization, and you have VNC or serial access to your node (GCP gives you serial access, via web UI or an SSH-based proxy), you could completely _disable_ standard network-based login. (Writing an admin tool that connects to the serial console, gets a usable shell, and enables your sshd for when you need it, is an exercise for the inspired sysadmin. :P)
But this fun little trick is going to break a lot of stuff.
Perhaps a valuable resource would have a disposable proxy in front of it; then one way in (or even no ways in!) might be viable.
c) Not only production servers utilize internet.
c) fair enough, although you should probably be using keypairs and a vpn for test and dev envs too.