SSH Login Delayed Due to IPv6 Connections Failing

syswannabe

New Member
Joined
Jul 23, 2019
Messages
2
Reaction score
0
Credits
0
Recently, my SSH log-in command hangs when trying to connect via IPv6. I've isolated it to IPv6 being the issue because when I force (ssh -4) for my login, it immediately asks me for my password and does not hang up. Here's a sample from ssh -v:

Bash:
C:\Users\***>ssh -v syswannabe@hostname
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Connecting to hostname [XXXX:XXX:XX:XX::XX] port 22.
debug1: connect to address XXXX:XXX:XX:XX::XX port 22: Connection timed out
debug1: Connecting to fuerteventura [XXX.XX.XX.XX] port 22.
debug1: Connection established

I've disabled the IPv6 protocol on my RHEL system, and even modified the sshd_config to use inet for the AddressFamily. Here's a sample from the config file (/etc/ssh/sshd_config):

Bash:
#Port 22
#AddressFamily inet
#ListenAddress 0.0.0.0
#ListenAddress ::

HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

I don't know why a lot of it is commented out by default, but I've even restarted sshd with the hash tags removed in the config file to no avail. Aside from aliasing, is there any way force my ssh logins to use -4?
 


G'day @syswannabe and welcome to linux.org :)

Your question is beyond my paygrade but I am inclined to think it may be better situated in Networking.

Take a look around

https://www.linux.org/forums/linux-networking.144/

and if you think that is more appropriate, let me know and I will move you.

Cheers

Chris Turner
wizardfromoz
 
Hey there @syswannabe

I had this issue in the past and ended up just specifying ssh -4 for a bit..

You could also edit your ~.ssh/config file as mentioned here:

Good luck!
 
G'day @syswannabe and welcome to linux.org :)

Your question is beyond my paygrade but I am inclined to think it may be better situated in Networking.

Take a look around

https://www.linux.org/forums/linux-networking.144/

and if you think that is more appropriate, let me know and I will move you.

Cheers

Chris Turner
wizardfromoz

I think you're right... I appreciate the guidance.

Hey there @syswannabe

I had this issue in the past and ended up just specifying ssh -4 for a bit..

You could also edit your ~.ssh/config file as mentioned here:

Good luck!

Yeah, I've noticed a lot of the lines in my ssh_config and sshd_config are commented out. I will need to read up on how to edit these files so that AddressFamily could be read in because specifying that field only doesn't seem to do anything. Thanks for the feedback!
 

Members online


Top