Forwarding X connections over ssh under 5.3-RELEASE with Xorg

Sean Welch Sean_Welch at alum.wofford.org
Sun Nov 28 15:32:24 PST 2004


I've been struggling with this over the last week and finally managed
to figure out what was happening -- though I don't understand *why* it
was happening.

I set up sshd_config the same way I did under 5.2.1-RELEASE running an
updated version of openssh from ports.  That version is the same as
that used in the base system for 5.3-RELEASE.  When I attempted to run
something like xterm across an ssh link I got the following:

xterm Xt error: Can't open display: localhost:10.0

What I eventually figured out was that localhost was being resolved to
::1 instead of 127.0.0.1 when I invoked the command.  Swapping two
lines in my /etc/hosts file fixed this:

127.0.0.1		localhost
::1			localhost

I have always had the ::1 line above the 127.0.0.1 line before and it
has worked perfectly -- until now.  I discovered a while back that the
::1 line was necessary and should be first but I cannot now find my
notes about what problem this resolved (it was several OS revisions
ago) and I worry that whatever problem it was will now reappear.

Has something changed about the way the system resolves addresses now?
Or is it just xauth that has changed in some fashion (this is after
all the first time I've ever run Xorg instead of XFree86)?  Can
someone explain what the ::1 line is used for and whether it is safe
to leave it secondary in the file?

Sean



More information about the freebsd-x11 mailing list