[Linux-disciples] Copying amongst machines via scp
Stephen R Laniel
steve at laniels.org
Fri Feb 2 12:54:54 EST 2007
Suppose I want to download a file from a server called host1
to my machine, but that I can only connect to host1 via
host2. Normally the way I do this is just
ssh host2
scp host1:[filename] ~ # download from host1 to host2
[suspend ssh session to host2]
scp host2:[filename] ~ # download from host2 to client
[resume ssh session to host2]
rm [filename] # delete file off host2
exit # quit out of host2
There must be some way to do this entirely using ssh
commands. For instance, if I wanted to *cat* the file on
host1, I could do
ssh host2 ssh host1 cat [filename]
and that would work fine. I could do
ssh host2 ssh host1 cat [filename] > ~/local_filename
to solve the scp problem, but is there some way to do it
that's less hackish?
--
Stephen R. Laniel
steve at laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20070202/a7a5a834/attachment.pgp
More information about the Linux-disciples
mailing list