X forwarding over ssh stacked over ssh?

From: r5 (r5ahhj@cotse.net)
Date: 01/29/02

  • Next message: SmurfMan: "Biometric Security"

    From: r5ahhj@cotse.net (r5)
    Date: 28 Jan 2002 20:57:39 -0800
    
    

    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.
          
    I've gotten the standard forwarding to work for 2 machines called
    A and B:
          
      A:
        % sshd2 -p 2222
           
      B:
        % ssh2 -p 2222 A
        % echo $DISPLAY
         A:10.0
        % xclock
        <works>
          
    But now, let's assume that there is a firewall preventing A from
    accepting any incoming connections on port 2222. To get around
    this I tried an ssh from A to B which sets up a tunneled port 2222
    from B in to A. This appears to set up okay, but the moment that
    I try to use X over this tunneled ssh, it hangs.
          
      A:
        % sshd2 -p 2222
          
      B:
        % sshd2 -p 3333
           
      A:
        % ssh2 -p 3333 -R 2222:localhost:2222 -f B
          
      B:
        % ssh2 -p 2222 localhost
        % echo $DISPLAY
        A:10.0
        % xclock
        <terminal hangs>
          
    In the set up above, the xclock never appears, and the terminal
    hangs. Is what I am attempting possible, or are there some
    underlying aspects of ssh2's X-forwarding which complicate
    the situation? And back to my original question, is there an
    easier way to forward X from the ssh side to the sshd side
    (reverse of standard approach)?
          
    Thanks.



    Relevant Pages

    • Re: Auto login with ssh
      ... > then when I ssh to the remote from local host, ... tends to get me when I haven't set up auto login with ssh for a while ...
      (comp.os.linux.networking)
    • Re: Auto login with ssh
      ... >> configure the SSH, but it really seems not working fine. ... I have followed most of the instructions of some web site teaching ... then when I ssh to the remote from local host, ...
      (comp.os.linux.networking)
    • Re: X forwarding over ssh stacked over ssh?
      ... >Is there a way to forward X from the local host ... >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 ...
      (comp.security.ssh)
    • Re: FreeBSD Crash without Errors, Warnings, or Panics
      ... Also, some network ports still respond, like a telnet to port 22 to test SSH will yield an SSH banner, but trying to connect with SSH just hangs. ... The box runs a web-based app and connects to a local Postgres DB which seemed to be unable to start new connections being requested by the PHP scripts. ... The only glimmer of information I have is that *one* time there was an error on the console about there not being any RAID controller available. ...
      (freebsd-hackers)
    • Re: ssh session hangs after authentication
      ... (I rarely ssh out from this ... I'll mention that process occasionally hangs ... log file. ... versions of openssh, ...
      (comp.security.ssh)