Re: sftp over two connections

From: Benjamin Hornberger (benjamin.hornberger_at_stonybrook.edu)
Date: 03/11/05

  • Next message: Ron Hardin: "Putty auto-echo tab?"
    Date: Fri, 11 Mar 2005 11:08:41 -0500
    
    

    Benjamin Hornberger wrote:
    > Hi all,
    >
    > I frequently work remotely on a Linux box (call her LIN) in a large
    > research lab. The lab's firewall blocks direct access to my machine from
    > the public internet, but they offer an SSH gateway (call it GATE) to
    > which you can log on from outside, and from GATE you can connect to
    > computers inside the lab. So, from my Windows machine (WIN) at home I
    > log onto GATE, from there I log onto LIN and I can work on the console.
    > X tunneling works as well, and I tunnel additional ports to control
    > research instruments which accept TCP connections (through both
    > connections). So far, so good.
    >
    > Now I would like to establish an SFTP connection from WIN to LIN as well
    > for easy file transfer, but I can't figure out how to do it. If I open a
    > file transfer window on WIN, I end up in GATE's filesystem, not LIN's.
    > Can it be done by setting up a certain tunnel? Or could an NFS
    > connection be tunneled through SSH so that I could mount LIN's
    > filesystem in a directory on GATE, and then use the SFTP connection to
    > access that directory on GATE?
    >

    I found the solution: Tunneling the complete SSH connection through an
    SSH tunnel. I ssh to GATE, forwarding port X (some free port) to port 22
    on destination host LIN. Then I open another ssh connection from WIN to
    localhost:X. That's it. Works for the terminal (ssh) and file transfer
    (sftp).

    Benjamin


  • Next message: Ron Hardin: "Putty auto-echo tab?"

    Relevant Pages

    • Re: What is The SSH?
      ... Building and Using SSH Tunnels ... What is an SSH tunnel? ... how to use it to make a connection to a server. ... You will need a working SSH client and server installation to build and test ...
      (microsoft.public.windows.server.networking)
    • SSH TCP forwarding: works with v1, not with v2 ssh
      ... that they're setting up the tunnels with no problem, ... I can get to the work ssh daemon: ... debug1: Connections to remote port 65002 forwarded to local address palimpsest:22 ... something answers (if I get "connection refused" there's no listener); ...
      (FreeBSD-Security)
    • Re: SSH TCP forwarding: works with v1, not with v2 ssh
      ... >that they're setting up the tunnels with no problem, ... >I can get to the work ssh daemon: ... > debug1: Entering interactive session. ... > Connection closed by foreign host. ...
      (FreeBSD-Security)
    • Re: PPP VPN solution over ssh tunnel?
      ... I run an ssh tunnel home from work all day long. ... I could run a traditional VPN connection ... but it worked for some things socks proxy did not. ...
      (comp.os.linux.networking)
    • Re: Problem connecting to SSH, OpenVMS7.3-2, HP TCP/IP v5.4 patched
      ... warning: Authentication failed. ... connection lost (Connection closed by remote host.). ... So, as you can see, I am trying to make an ssh connection with the ...
      (comp.os.vms)