When I attempt to ssh into my server it hangs for a long time. Looking at the output from ssh -vvv [host] shows it hanging when it attempts to connect to my server using its IPv6 address, then timing out and connecting immediately using the IPv4 address. I've confirmed this by doing ssh -4 [host] and there's no delay in connecting.

What is wrong here? Is my server misconfigured, is my local computer misconfigured?

  • There's no way to know, from your description. You will need to check both of them. – Michael Hampton Mar 20 '17 at 5:20
  • Post your debug output – Joe Niland Mar 20 '17 at 5:27
  • @MichaelHampton You must understand that I am asking this question as I don't know what to check. – Michael Ozeryansky Mar 20 '17 at 20:32

Can you ping6 your server? If y, check your sshd_config, probably it's listening to IPv4 only? Did you specified any listen address in it? netstat -tanp might help too. If you can't even ping6 check your client's and server's v6 addresses and ip6tables configurations.

  • If it wasn't listening on IPv6 then the ICMP error message should stop the timeout and make the client continue. Either the IPv6 traffic is getting lost or there are too aggressive firewalls/ip6tables in place blocking the SSH and/or the ICMP messages. – Sander Steffann Mar 20 '17 at 7:39
  • 1
    Yes, maybe not listening AND miscondigured firewall. – Marco Mar 20 '17 at 7:46
  • When problems don't seem logical then there are often multiple causes at the same time :) – Sander Steffann Mar 20 '17 at 7:49

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.