I'm connecting to an SSH server where I'm not fully in control of the sshd configuration. The server allows both public-key auth and password auth, but I want to prevent my SSH client from switching over to password auth, even when public key auth fails.
I've tried adding PasswordAuthentication no
to the server entry in ~/.ssh/config
but it has no distinguishable effect.
Is it even possible?
I understand that this will not provide any additional security. I'm seeking to do this solely for UX purposes, to avoid certain situations where some applications get stuck waiting for a password.