When I connect to my Debian server via ssh, the ssh client tries to establish a IPv6 connection. This fails after a long timeout (~30sec), then falls back to IPv4, which then succeeds, and I'm prompted for a password.
This is quite annoying, because I often miss the time I can enter the password (password timeout feels really short in comparison), and I have to sit through this again.
This happens both on Windows via putty and on my Debian machine using the standard ssh client.
I like to fix this either by making the IPv6 connection working or by directly connecting via IPv4.
- How can I find out why I'm unable to connect via IPv6?
- How can I configure my ssh client to connect via IPv4?
Here is what my output of ssh is like (changed personal data)
> ssh -v firstname.lastname@example.org OpenSSH_6.9p1 Debian-2, OpenSSL 1.0.2d 9 Jul 2015 debug1: Reading configuration data /home/someuser/.ssh/config debug1: /home/someuser/.ssh/config line 12: Applying options for somedomain.com debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to somedomain.com [1234:1234:1234:1234::1] port 12345.
after this ssh waits for ~30sec (as mentioned above), and then falls back to IPv4 and I can login as usual.
I did some testing, and I think the server is not setup correctly for IPv6
ping6 ::1 and
ssh -6 ::1 worked). For now I will configure my ssh clients to use IPv4 until I figured out how to fix IPv6 on my server.