Transfer file from remote machine to local machine

Karl Auer kauer at biplane.com.au
Tue Jul 18 02:54:37 UTC 2017


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.

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 :-(

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A
Old fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B






More information about the ubuntu-users mailing list