scp: ambiguous target

I was recently trying to copy a simple bash script from one FileMaker server to another using scp. The standard scp command is:

scp file.ext destination_user@server.address:/Folder/file.ext

This would leave you to think that the scp command for copying a script from one FileMaker server to another would look like this:

scp user@123.456.7.8:/Library/FileMaker\ Server/Data/Scripts/


This however fails with the response from terminal being:

scp: ambiguous target

Since the FileMaker Server folder contains a space this causes the failure, despite placing the backslash before the space. The answer is to put quotes around the entire destination to look like this:

scp user@123.456.7.8:"/Library/FileMaker\ Server/Data/Scripts/"

1 thought on “scp: ambiguous target”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.