To address security issues with the scp command, we are in the process of adding checks to ensure that the files returned by a remote server match the files requested by the user. In some cases, the checks implemented in scp to address this issue may cause requested files to be rejected with the following error message:
protocol error: filename does not match request
This error can occur when you use quotation marks to escape special characters (such as a space) on the remote server, or when you use wildcard characters. The safest way to avoid this issue is to use the sftp command instead of scp to retrieve files. This avoids complications due to interpretation of the requested file names by the shell on the remote server.
For file retrieval, the syntax and command-line options for sftp are very similar to those for scp. For example, to retrieve files matching test*.cfrom a remote server to the directory somedir, use the following command line:
?$ sftp somehost:'test*.c' somedir/
Alternatively, you can add the -T option to the scp command line to disable checking of the file names returned by the remote server. Following the example above, the scp command line would be:
$ scp -T somehost:'test*.c' somedir/
If you need further help, please contact the NAS Control Room at (800) 331-8737 or (650) 604-4444.