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?