Sometimes I need to ssh to a new remote server and immediately fix something without ssh trying to find any private keys on my host. It usually stalls at this point:
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/blah' not found
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/blah2' not found
debug1: Unspecified GSS failure. Minor code may provide more information
Is there a way I can specify for ssh to just do password based authentication immediately?
This setting can also be put into
~/.ssh/config
if you do not want key access for any server that allows password access.It's trying to find private keys on your computer; the remote computer would have the public key. Remote computers should never have your private key (unless it's a computer under your control).
Looks like you've got GSS Auth turned on, from the command line you can turn it off with something like
ssh -o GSSAPIAuthentication=no [email protected]
.If that works it would probably be easier to turn off for default connections by adding
GSSAPIAuthentication no
under theHost *
section of your~/.ssh/config
file (or the system widessh_config
file). If you need it for local servers you can then add aHost *.my_company.com
section with it turned back on.If you connecting to the server with a command like
ssh [email protected]
then problem you are seeing is most likely caused by the client not being able to resolve the hostname of the server. Once the client can resolve the server's hostname you still get the error messages but without the delay which is caused by the name service timing out.