ssh: do ssh cert info before asking for credentials

We know the host's key as soon as we connect, so we should perform the
check as soon as we can, before we bother with the user's credentials.