Transferring file to local machine when SSHing into a foreign box

Dotan Cohen dotancohen at gmail.com
Sun May 13 03:45:20 EST 2012


On Wed, May 9, 2012 at 12:38 AM, Ángel González <keisial at gmail.com> wrote:
>> Rereading my original post, I see that I did not explicitly state that
>> such an easy command was my goal. I often SSH into different machines
>> and many of those I cannot modify with aliases and such. However, a
>> facility for easily transferring files from / to these machines would
>> be very nice.
>
> How do you expect such command to work?
>

I imagine something like this:
The user would run a command such as the following:
remoteServer$ cp2local someFile.c
The SSH server on the remote host would then push the file to the SSH
client running locally just as if scp had been used, but it would
reuse the existing connection. The local SSH client would then write
the file just as it would have had scp been used.



> You could reconfigure your current connection adding a tunnel, and then
> use that for transfering the files, but you'd still need a local daemon
> (eg. ftpd) where to drop them.

I am sure that you recognise the added complexity for the user by way
of the workaround that you mention. From a technical point of view,
OpenSSH already has the components necessary to make this a simple
procedure.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com


More information about the openssh-unix-dev mailing list