Amidst configuration for X11 forwarding thru ssh, it is required to add AddressFamily inet
option in /etc/ssh/sshd_config
as per this answer, to work.
On RHEL 7.x box, that is used in our case, X11 forwarding thru ssh works only after this configuration change.
Without this configuration change, a simple ssh connection between ssh client and ssh server works, but X11 forwarding through ssh doesn't work.
Reason mentioned, for this configuration change is: it attempts to connect via ipv6 and ends up falling back to ipv4
Under the hood,
I can understand that ssh server would socket(AF_INET6, ,,)
and then fall back to socket(AF_INET,,)
, without this configuration change.
Why does this configuration change help ssh server do X11 forwarding?
AddressFamily inet
avoids using IPv6. – dirkt Sep 23 '18 at 18:57inet
in box1 cannot talk toinet6
in box2. Do you think, in RHEL 7.x, ssh is never falling back to ipv4? in case of ipv6(inet6) disabled.. – overexchange Sep 26 '18 at 21:54