If you happen to want to copy a file in the current directory with a colon in the name:
scp some-file:123.txt user@host:/path/to/some-place
this will fail. Possibly after quite a timeout, with a completely unrelated error (unresolved domain name some-file maybe?)
This is because ssh uses colons to separate the user@host part from the filename part.
The fix when the source is on the local computer is to ensure the path starts with a dot:
scp ./some-file:123.txt user@host:/path/to/some-place
Incidentally this is related to that old newby fail, forgetting the trailing colon when coping to a destination home directory:
scp some-file.txt user@host
results in a file in the current directory called ‘user@host’. Oops!
posted in ssh
subscribe via RSS