Running ssh user@hostname
takes ~30s. Here's the scenario:
- this is a VM on the local LAN
- Windows and Mac machines get instant login
- am using Debian and I could reproduce with an Ubuntu machine
- someone using Ubuntu says that logging into my machine (local LAN) is also instant
- using hostname IP address takes about half as much time (~15s)
[update]
Using ssh -vvv user@hostname
, here's where it waits the most:
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
And then it waits a bit here:
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found
id_dsa
orid_rsa
file in your~/.ssh
? maybe your ssh installation tries the wrong authentication first and your server doesn't deny but simply ignore that request resulting in that 30s timeout"~/.ssh"
file. That's a directory, and it only has"known_hosts"
file in it.UseDNS no
insshd_config
on the server. In any case, runssh -vvv user@hostname
to see where the login is hanging.