Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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@136.198.117.4:/www/oqc/inspection_report.php qa-desktop2@10.230.35.212:/home/qa-desktop2/desktop

then type the password:

jeinqa@136.198.117.4'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

2 Answers 2

up vote 1 down vote accepted
qa-desktop2@qa-desktop2:~$ scp jeinqa@136.198.117.4:/www/oqc/inspection_report.php  /home/qa-desktop2/desktop 

should be enough, assuming that 10.230.35.212 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
1  
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

 
discard

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.