Re: X forwarding over ssh stacked over ssh?

From: Juri Munkki (jmunkki@alpha.hut.fi)
Date: 01/30/02


From: jmunkki@alpha.hut.fi (Juri Munkki)
Date: 30 Jan 2002 15:06:40 GMT

In article <842eb435.0201282057.7e0e810b@posting.google.com> r5ahhj@cotse.net (r5) writes:
>Is there a way to forward X from the local host (where ssh is run)
>to the remote host? The set up of ssh seems to be hard wired just
>to permit forwarding from wherever sshd is run to the client
>side.

Can you explain in more detail why you would want to do it this way?
      
>From what you write later on, I assume you have sshd on both machines
and the reason you want to go the other way is that you can't use SSH
to connect one way, but it works the other way.

So, how about this (assuming you have sshd on the standard port on
each side):

On machine A:

        ssh B -R 22022:A:22

And when you connect to B:

        ssh localhost -p 22022

You are now tunneling the second SSH connection over the remote tunnel
established by the first connection. The ssh client is running on B, where
you presumably have your X server running and the X client application is
on A.

-- 
Juri Munkki jmunkki@iki.fi			What you see isn't all you get.
http://www.iki.fi/jmunkki		     Windsurfing: Faster than the wind.



Relevant Pages

  • Re: SSH through wireless router
    ... When you say that I should try ssh ... Connection closed by remote host ... When I went to sshd to port 2222: ... debug1: read PEM private key done: type RSA ...
    (Debian-User)
  • Re: How do I port forward through 2 remote hosts?
    ... You gave a port number. ... desktop to a remote host for many years. ... I have read through the SSH FAQ which did nothing to help me ... loss to understand what remote forwardings (as opposed to local ...
    (comp.security.ssh)
  • Re: Passwordless ssh - SOLVED -
    ... I can now login without passwords but I have to kinit on each box before it will work. ... I built my kdc and configured my ssh daemon to use kerberos on both computers. ... I copied the krb5.keytab file to my remote host and setup the krb5.conf file on the remote host. ... After this is done I can ssh from my KDC to my remote host and I am not asked to enter my password. ...
    (comp.protocols.kerberos)
  • Re: unattended file transfer with ssh
    ... disadvantage to using rsync and can't come up with one:) ... To set up ssh, ... $HOME/.ssh/authorized_keys on the remote host. ... On the local machine invoke this command: ...
    (comp.security.ssh)
  • Re: reverse SSH / SSH over NAT traversal
    ... The remote host is behind a NAT/firewall and it's not possible to ask the admin to tunnel a port. ... can the remote user type in some command in their terminal to connect (SSH?) to my network - and thereby allow me to get a terminal on the remote machine. ... I think this is possible with a reverse SSH tunnel - but I don't really want to allow the remote user any access to my system. ...
    (Fedora)