using x11 forwarding with ssh from a jail

Erwin Lansing erwin at lansing.dk
Mon Apr 21 02:14:19 PDT 2003


On Sun, Apr 20, 2003 at 07:31:33PM -0400, Brian Dean wrote:
> Hi,

Howdy,
> 
> Is anyone having problems connecting to their X server from inside a
> jail using ssh's X11 forwarding?
> 
> >From my non-jail environment, I ssh into my jail environment with X11
> forwarding enabled.  When I try to invoke an X application, I get:
> 
>   % xclock
>   X11 connection rejected because of wrong authentication.
>   X connection to localhost:11.0 broken (explicit kill or server shutdown).
> 
> It works fine if I uset 'xhost +' in my non-jail environment and the
> point my display appropriately from inside the jail (bypassing ssh x11
> forwarding).  Any ideas why X11 forwarding doesn't seem to do the
> right thing?
> 
This has probably something to do with the mapping of localhost to the
external ip address of the jail. Try setting:

X11UseLocalhost no

in /etc/ssh/sshd_config in your jail should fix this.

Cheers,
-erwin

-- 
                    _._     _,-'""`-._
Erwin Lansing      (,-.`._,'(       |\`-/|    http://droso.org/
erwin at lansing.dk       `-.-' \ )-`( , o o)    http://fnidder.dk/
                    -bf-      `-    \`_`"'-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030421/b0703a80/attachment.bin


More information about the freebsd-hackers mailing list