Linux / UNIX: scp / rsync File Name With a Colon (:) In It

Posted on in Categories , , last updated February 23, 2014

How do I copy a file with a colon punctuation (:) name in it. When I type the following command to copy “file:name.txt” to a remote host called server1:

scp file:name.txt [email protected]:/path

I get the following error:

ssh: Could not resolve hostname s: Name or service not known

How do I copy file with scp or rsync with a colon in it?