[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Do I *have* to have xauth (and all that it brings in?)



On Wed, Jul 28, 2004 at 03:50:51PM -0700, Bill Moseley wrote:
> I want to use X11 Forwarding.  Normally I can ssh -X to a machine and
> it works fine.
> 
> But, I have a case where I need to first ssh to a machine on a public
> IP and then from there ssh into the machine on the local LAN where I
> want to run the application.
> 
> The problem is the machine in the middle is a server that doesn't have
> any X libraries -- and doesn't have xauth.  So ssh -vv -X <machine>
> reports:
> 
>   debug1: Remote: No xauth program; cannot forward with spoofing.
> 
> I don't really want to apt-get xbase-clients:
> 
> # apt-get -s install xbase-clients
> Reading Package Lists... Done
> Building Dependency Tree... Done
> The following extra packages will be installed:
>   libdps1 libfreetype6 libxaw7 xlibmesa3 xlibs 
> 
> Is there any other way around that?
> 

Yes, the following should work.

First connect to the external host and create a tunnel to port 22 (ssh)
on the internal host.

$ ssh -L 2222:internal-host:22 user@external-host

Then connect to the internal host via the tunnel in another shell, and
forward X11.

$ ssh -p 2222 -X user@localhost

If port 2222 is in use by another process, it can be changed to any free
port > 1024.

/Mikael



Reply to: