Skip to main content

Timeline for Interesting Secure Copy Behavior

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
Aug 9, 2012 at 1:03 answer added Gilles 'SO- stop being evil' timeline score: 1
Aug 8, 2012 at 19:49 comment added jsbillings @degausser: no, if both the source and destination are local, it uses cp, but as far as scp knows, hostname:path is a remote path, which is why you saw what you did.
Aug 8, 2012 at 18:29 vote accept degausser
Aug 8, 2012 at 18:28 vote accept degausser
Aug 8, 2012 at 18:28
Aug 8, 2012 at 18:27 comment added Claudio If your goal is just making the copy, I can see no reason to go over the network for it :)
Aug 8, 2012 at 18:24 history edited degausser CC BY-SA 3.0
edited title
Aug 8, 2012 at 18:20 comment added Claudio scp -r /tmp/test /tmp/test, without any hostname references does seem to call cp indeed, as the error message is exactly the same as cp -r /tmp/test /tmp/test.
Aug 8, 2012 at 18:19 comment added degausser @Claudio And there's absolutely no reason to scp something to yourself?
Aug 8, 2012 at 18:12 comment added Claudio I carried out a simple test and the behaviour with cp is different, as it doesn't allow to copy a directory over itself: $ cp -r /tmp/test /tmp/test (line break) cp: cannot copy a directory, ‘/tmp/test’, into itself, /tmp/test/test’. With the scp line you supplied an infinite recursion takes place.
Aug 8, 2012 at 17:54 comment added degausser @jsbillings Is that still the case with the the syntax I added?
Aug 8, 2012 at 17:52 history edited degausser CC BY-SA 3.0
added 106 characters in body
Aug 8, 2012 at 17:38 comment added jsbillings If you supply local source and destinations, scp just calls cp.
Aug 8, 2012 at 17:35 answer added Claudio timeline score: 1
Aug 8, 2012 at 17:31 comment added Claudio Which switches did you use with scp? Do you have the full command line?
Aug 8, 2012 at 17:23 history asked degausser CC BY-SA 3.0