Home
|
FAQ
|
Feedback
|
Licence
|
Updates
|
Mirrors
|
Keys
|
Links
|
Team
Download:
Stable
·
Snapshot
|
Docs
|
Changes
|
Wishlist
PSCP, when it is using the SCP protocol (which is rare), can attempt to create filenames containing spurious newline characters, or wrongly complain that the server is requesting this. (This error was introduced shortly before 0.71 was released, and fixed shortly afterward.)
In most circumstances, PSCP will use the more modern SFTP protocol, which does not have this problem. The SCP protocol will only be used if the server doesn't appear to support SFTP (rare), or if the user explicitly specified the -scp option on the command line.
For instance, you might see this when copying a single file:
$ ./pscp -scp remotehost:stoat . Keyboard-interactive authentication prompts from server: | Password: End of keyboard-interactive prompts from server warning: remote host tried to write to a file called 'stoat ' when we requested a file called 'stoat'. If this is a wildcard, consider upgrading to SSH-2 or using the '-unsafe' option. Renaming of this file has been disallowed. stoat | 0 kB | 0.0 kB/s | ETA: 00:00:00 | 100%
Note the quote mark on a line on its own -- that shows a newline character is in the filename. In this case, PSCP knows the intended filename from the command line, so it grumbles and the local file is written out with a sensible filename. (The warning is spurious; the bug is that PSCP briefly forgot how the SCP protocol worked.)
It's worse when copying whole directories:
$ ./pscp -r -scp remotehost:dir . Keyboard-interactive authentication prompts from server: | Password: End of keyboard-interactive prompts from server warning: remote host tried to write to a file called 'dir ' when we requested a file called 'dir'. If this is a wildcard, consider upgrading to SSH-2 or using the '-unsafe' option. Renaming of this file has been disallowed. stoat | 0 kB | 0.0 kB/s | ETA: 00:00:00 | 100%
Here it's created a directory called dir (without a newline), but in this Unix example, the file(s) inside it have been created with a newline in the actual filename. This is an unusual thing to have in a filename, and might confuse other tools or be difficult to delete.
In the same case on Windows, the operating system simply refuses to create a file whose name contains a newline character:
pscp: .\dir\stoat : Cannot create file