Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 2 Linux machines (CentOS), and I want to transfer a file from one of them to a directory on the other. A co-worker suggested using scp. I've looked at the official docs, and tried getting it to work to no avail.

Server names are and; if I am on thing1, and want to SSH into thing2, I just type the following command, and I'm in.


I tried doing the same for SCP, and had no luck. I tried all sorts of variants, but I'm getting nowhere.

scp myfile.txt
scp myfile.txt ssh://

Do you have any advice?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The scp syntax is host:file, so you want

scp myfile.txt

(If the target path is empty does not start with a /, it will be relative to your home directory.)

share|improve this answer
You can also do it completely without sshing into thing1 at all. scp – Rob Feb 3 '12 at 15:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.