When trying to do: ssh -oBatchMode=yes -4 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
ssh fails when the password of the remote linux user starts with a special char(for example !Passw0rd) and shows the following error: "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)"
When creating a user with password such as Passw0rd! it works properly.
permission denied
message does not mentionpassword
. It mentionspublickey
; this method can ask for the passphrase. And it mentionsgssapi-*
; this one I don't know, but it seems it shouldn't ask. Anyway, thepassword
method was not used. So maybe you were asked for something else. Or maybe the question contains misleading or incomplete information.