Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have confused how to do that. someone tell me to use scp but it still unclear for me. I just can control the server using ssh.

I did like:

qa-desktop2@qa-desktop2:~$ scp jeinqa@ qa-desktop2@

then type the password:

jeinqa@'s password:

then show:

Could not create directory '/home/jeinqa/.ssh'.
Host key verification failed.
lost connection

why? what is the correct steps to to that?

share|improve this question
up vote 1 down vote accepted
qa-desktop2@qa-desktop2:~$ scp jeinqa@  /home/qa-desktop2/desktop 

should be enough, assuming that is your local machine that you run this on, so you omit the user@host: part for the local part of the copy action.

share|improve this answer
whether I just can copy a single file? how if I want to copy all file in directory? – klox Sep 14 '11 at 9:31
Use scp -r. And read man scp. – Sven Sep 14 '11 at 9:32
and bear in mind its scp -r <rest of command> and not scp <rest of command> -r. Gommon gotcha – Sirex Sep 14 '11 at 9:47

Also, please read some info about rsync it is very powerful and has proven to be more powerful and useful then scp in most cases.

Also, you could try sftp, works like regular ftp but does it over the secure ssh connection.

share|improve this answer
rsync is a bit overkill for this, you do not need deltas etc. Also scp & sftp work on most SSH-enabled systems while rsync requires a special daemon – dtech Sep 14 '11 at 10:12

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.