I want to test whether or not an ssh server allows passwords and immediately close the connection without actually attempting a login.
Something like this:
allows_password=$(ssh --some-option example.com) if [ -z "$allows_password" ]; then echo "Insecure Server Options" else echo "Insecure Password Access is not Allowed, Great!" fi
I've actually done this once before, but I couldn't find old script or docs. Sad day. :-/