Transfer file from remote machine to local machine

Yubin Ruan ablacktshirt at gmail.com
Tue Jul 18 20:36:51 UTC 2017


On Tue, Jul 18, 2017 at 12:54:37PM +1000, Karl Auer wrote:
> On Tue, 2017-07-18 at 18:17 +0800, Yubin Ruan wrote:
> > Assuming that:
> > > a) you can ssh from your system to machine A
> > > b) you can ssh from machine A to machine B
> > > c) you have credentials for machine B
> > > 
> > > ... then you can set up a tunnel.
> > > 
> 
> > This seems perfect and I agree with your suggestion. But,
> > unfortunately, as remoteA is used as a relay, tunneling is block on
> > remoteA. I just cannot create a tunnel to remoteB on remoteA.
> 
> The solution requires nothing except the ability to ssh to remote A
> from your system, and the ability to ssh from remote A to remote B.
> 
> Unless - and perhaps this is what you mean - sshd is configured on
> remote A or remote B to not permit port forwarding.

Yes, I think so, unfortunately...
 
> If port forwarding is not forbidden, you should be able to tunnel to
> remote B as described. And you can do this using ONLY ssh on the
> systems - yours, remote A and remote B.
> 
> Another possibility is to use script on your system. run script, log n
> to A, log in to B, cat the file, log out of remote B, log out of remote
> A, exit from script. Your entire session, including the catted data,
> will be in a file called typescript in your current working directory.
> You can edit it to remove the unwanted bits. This may not be useful if
> the file you need is binary :-(

They are not binary, but they are a few Gb large... :-(

Yubin




More information about the ubuntu-users mailing list