Re: scp in reverse?

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Lisa Kachold
Date:  
To: Main PLUG discussion list
Subject: Re: scp in reverse?
On Sat, Mar 31, 2012 at 8:11 PM, Michael Havens <> wrote:

> I was wondering.... could you do this via ipaddress?
>
> On Thu, Mar 15, 2012 at 12:01 PM, <
> > wrote:
>
>> Yes, scp (like cp) will copy back or forth, the 2 commands below are
>> legal:
>> scp myuser@remotebox:/that/file /this/path
>> scp /this/path myuser@remotebox:/that/file
>> 1st one will 'retrieve' /that/file from 'remotebox' into /this/path
>> 2nd one will copy /this/path to /that/file in 'remotebox'.
>> ET
>>
>> writes:
>>
>>>
>>> This is interesting. Does this really mean that
>>> scp in reverse is possible by using a similar syntax
>>> with the dot at the end to extract a file from a remote
>>> computer to my local computer?
>>> -----------------
>>> Mike Ballon wrote (in part) ... scp in reverse:
>>> scp 192.168.0.4:Pictures/2009-**Move.from.Florida .
>>> I'm guessing the path of the pictures and take note of the dot at the
>>> end
>>>
>>>
>>>

Correct,

I setup a firewall one time for an "eccentric" entrepreneur, who insisted
that we use the same root password on everything, and didn't want a Bridged
iptables (passthrough) with FORWARD tables, just INPUT tables (so he could
run daemons and access from either side on the firewall [easy to fuzz]).
This wonderfully obsessive man was also known to be a bit dyslexic and
entered the scp syntax backwards (recursively sending a whole directory to
the /), therefore overwrote the firewall configurations.

Be careful with the "."

So, the syntax is:
GET STUFF from OTHER BOX:

scp :/etc/shadow /tmp/johnhackfile


PUT STUFF from THIS BOX:

scp myfile.tgz :/tmp/

Get or put a whole directory:

*scp -r :MyDir/09 ./r9/*

copy directory ``MyDir/09/'' recursively (i.e., the directory and all its
contents) from
laughaminute.com (where you are "clown" into a new directory ``r9/'' in
your current working directory on localmachine.

*scp -r ./r9/ **:MyDir/09*

       Copy directory ./r9 recursively (i.e. the directory and all its
contents) from localmachine to
       laughaminute.com using the clown users' path settings and permissions.



Sometimes a better alternative is to ssh to the remote computer, bundle the
files you want into a single
tar<http://en.wikipedia.org/wiki/Tar_%28file_format%29>file, scp that
file over, and unpack it where you want the files.

--
(503) 754-4452 Android
(623) 239-3392 Skype
(623) 688-3392 Google Voice
**
it-clowns.com
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss