Worse still, in a remote-to-local copy you have to specify the local file name explicitly, otherwise PSCP will complain that they don't match (unless you specified the -unsafe option). The following command will give an error message:
c:\>pscp user@host:"\"oo er\"" .
warning: remote host tried to write to a file called 'oo er'
when we requested a file called '"oo er"'.
Instead, you need to specify the local file name in full:
c:\>pscp user@host:"\"oo er\"" "oo er"
If PSCP is using the newer SFTP protocol, none of this is a problem, and all filenames with spaces in are specified using a single pair of quotes in the obvious way:
pscp "local file" user@host:
pscp user@host:"remote file" .
A.7 Troubleshooting
A.7.1 Why do I see ‘Incorrect MAC received on packet’?
One possible cause of this that used to be common is a bug in old SSH-2 servers distributed by ssh.com. (This is not the only possible cause; see
section 10.11
in the documentation.) Version 2.3.0 and below of their SSH-2 server constructs Message
Authentication Codes in the wrong way, and expects the client to construct them in the same wrong way. PuTTY constructs the MACs correctly by default, and hence these old servers will fail to work with it.
If you are using PuTTY version 0.52 or better, this should work automatically: PuTTY should detect the buggy servers from their version number announcement, and automatically start to construct its MACs in the same incorrect manner as they do, so it will be able to work with them.
If you are using PuTTY version 0.51 or below, you can enable the workaround by going to the SSH panel and ticking the box labelled ‘Imitate SSH2 MAC bug’. It's possible that you might have to do this with 0.52 as well, if a buggy server exists that PuTTY doesn't know about.