scp does a local copy when ommiting :
Dan Kaminsky
dan at doxpara.com
Wed Sep 1 08:39:09 EST 2004
Damien Miller wrote:
>Christian Gut wrote:
>
>
>>Hi,
>>
>>I run into this quiet often:
>>
>>If you forget to add the : after the hostname you want to copy a file
>>to, then scp does a simple local copy. This is quiet confusing if you
>>dont notice it:
>>
>>"scp foo.txt server.bar.com:" (copies the file to remote homedir)
>>"scp foo.txt server.bar.com" (creates the new file server.bar.com)
>>
>>I don't know if this behaviour is intended or even needed, but if not I
>>would be glad if this could be fixed to prevent some mistakes.
>>
>>
>
>This would be a major change to scp's argument parsing - something we
>don't want to do. I'm sure that there are scripts out there that depend
>on this behaviour (which derives from 20+ year old rcp).
>
>-d
>
>_______________________________________________
>openssh-unix-dev mailing list
>openssh-unix-dev at mindrot.org
>http://www.mindrot.org/mailman/listinfo/openssh-unix-dev
>
>
Compromise -- could we set an environment variable to disable
self-copies like this? I've made this error hundreds of times.
--Dan
More information about the openssh-unix-dev
mailing list