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. Thanks Christian Gut -- Christian Gut <cycloon at is-root.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20040831/c875ab55/attachment.bin
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
Apparently Analagous Threads
- [Bug 882] Scp cannot copy self-referring directories
- scp, sftp, and special characters in filenames
- Feature Suggestion - scp don't decrypt file at destination unecrypt on copy back switch
- [Bug 485] scp doesn't preserve symbolic links
- scp bug: newly created dirs do not inherit sgid bit