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 want to transfer files between 2 different servers via a shell script (password less)

I set up the SSH keys following this tutorial : http://www.cyberciti.biz/tips/ssh-public-key-based-authentication-how-to.html

Then i try to the transfer of a file: test.txt from server1 to server2 using this command:

rsync -avz /home/tasklitetest/test.txt jansia@ps27670.dreamhost.com:/home/tasklite/

The command seems to execute without trouble because i got the following :

[2] 4920
[1]   Done                    rsync -avz /home/tasklitetest/test.txt jansia@ps27670.dreamhost.com
[ps115171]$ sending incremental file list

sent 62 bytes  received 12 bytes  148.00 bytes/sec
total size is 396  speedup is 5.35

But i got not file on my other server in /home/tasklite/

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Is the server you're connecting to actually impossibly named "ps27670.dreamhost.com:" or is that supposed to be a ":" that got munged in your copy/paste? The error message you're getting suggests that you have a stray "&" that's telling the shell to put the rsync command into the background.

If this is the case, clean up your command and try again. You probably want this:

rsync -avz /home/tasklitetest/test.txt jansia@ps27670.dreamhost.com:/home/tasklite/
share|improve this answer
    
Thank you :) it's working :p –  Jerome Ansia Aug 29 '12 at 18:53
1  
As a side note, you likely have a file named "jansia@ps27670.dreamhost.com" in the directory you ran the rsync command. Basically, what happened is that you copied the file /home/tasklitetest/test.txt to a new file jansia@ps27670.dreamhost.com. You only designate a remote host by putting ":" after the hostname, and specifying the remote target. –  cjc Aug 29 '12 at 19:07
    
ah ok i will check that i didn't know for the : i'll not forget now thanks! –  Jerome Ansia Aug 29 '12 at 19:10
    
yes you were right ;) –  Jerome Ansia Aug 29 '12 at 19:17

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.