A Procrastinator's Journal

Thinking aloud…

X11 forwarding on openssh server

leave a comment »

On my recent server installations, I noticed that X11 connections were not being forwarded via ssh. Initially I thought it was because of lack of some core X11 libraries in server installation. However, today I found that it was this OpenSSH bug related to a mess up between ipv4/ipv6. From the bug report:

What happens is that in x11_create_display_inet() (channels.c),
getaddrinfo() apparently returns the IPv6 address family first, and
sshd only tries to bind to that.

I always disable IPv6 in my installations (unless needed) to avoid confusion, and that explained why X11 forwarding refused to work over ssh.

A workaround for this problem is to add the following line to /etc/ssh/sshd_config:
AddressFamily inet

A similar problem also seems to affect Java networking according to this bug. I haven’t experienced it yet, but should remember just in case.


Written by ppatil

May 30, 2011 at 2:04 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: