Forwarding X via SSH under

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have been forwarding X (XFree86) with SSH using `ssh -X
userid@remotehost', but now that I have switched to (Gentoo
upgrade) I find that the same command sets up DISPLAY=thishost:0.0 on
the remote side rather than localhost:10.0 as it had under XFree86.  I
don't want to have to use xhost to allow remotehost access to
thishost.  Sshd_config on remotehost has X11UseLocalhost commented out
(it defaults to ``yes'') but even explicitly setting it to ``yes''
doesn't cause DISPLAY to be set to localhost.

What's changed with's handling of forwarding, and what needs to
be set to get X forwarding working the way it did under XFree86?  Is
this an issue, or SSH?

Michael J. Barillier               | ``When you have to shoot, shoot.
<blackwolf(at)> | Don't talk.''
Public key available on request.   |                     -- Tuco Ramirez

Re: Forwarding X via SSH under

Quoted text here. Click to load it

It looks more like an sshd configuration issue than an XFree/xorg change.
Make sure X forwarding is enabled in /etc/ssh/sshd_config, then restart
sshd ("/etc/init.d/sshd restart" on Gentoo).

    diff -r1.1 sshd_config
    < #X11Forwarding no
    > X11Forwarding yes

I just tried an "ssh -X me@localhost" and the DISPLAY was set correctly,
to "localhost:10.0".  The versions I have are


but I don't think it matters much.

pa at panix dot com

Site Timeline