SSH Client - Mac OS X Lion
SSH Server - Debian

/etc/hosts on Mac -> [IP of Debian] mydebian
Public key of Mac has already been put to authorized_key in root@mydebian:/root/.ssh
'UseDNS no' has been put to root@mydebian:/etc/ssh/sshd_config and then SSH server restarted

ssh root@mydebian -> wait for a long time to login
ssh -v root@mydebian -> no delay at all

Any ideas?

  • 2
    Any interesting output with -v / -vvv? – Daniel Beck Jan 23 '12 at 9:07
  • Can you format this better? – gadgetmo Feb 12 '12 at 9:05

Set the following value in /etc/ssh_config:

AddressFamily inet 

(You can set it in ~/.ssh/config as well.)

The reason is that ssh is trying to do IPv6 negotiation, which apparently fails after a timeout, which happened to me after migration to a new Lion (10.7.4) MacBook Pro.


Can you please check the negative? Put the IP of the source machine in the /etc/hosts and check what happens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.