Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hello I've tried both scp and rsync to copy resource from my machine to remote host.

I don't have a root access on a remote machine but I need to transfer big amount of files from my host to remote machine all located in different directories and doing this manually would just take really long time(it will take long time anyway).

This is what I've tried so far :

echo "password" | rsync -v -e myfile ssh user@remotehost:/home/user/destination

Or :

echo "password" | scp -r myfile user@remotehost:/home/user/destination 

Or:

scp -r myfile user@remotehost:/home/user/destination  <<EOF
password
EOF

But I still get that annoying prompt for password :

user@remotehost's password:

Any other suggestions that I try ?

Update

My user on the local machine is not same as the one on the remote machine(the one on the remote machine doesn't exist on my machine).

share|improve this question

migrated from stackoverflow.com Feb 21 '12 at 2:02

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

Looking at the link it seemed to be opposite to what I normally would do. Read this link : http://wp.uberdose.com/2006/10/16/ssh-automatic-login/ about setting it up. Using ssh-copy-id makes things easier.

It can be done with 2 commands from the client machine :

ssh-keygen -t dsa
ssh-copy-id -i id_dsa user@remotehost
share|improve this answer
add comment

You need to follow the steps given in the link so that it wont ask for password

share|improve this answer
    
do I need a root access for this on the remote machine? –  London Feb 8 '12 at 10:25
    
No...If you have an id with which you can login to the box then you can do the steps mentioned in the link –  Raghuram Feb 8 '12 at 10:26
    
so I guess my machine is client and the machine I'm copying to is a server? –  London Feb 8 '12 at 10:32
    
I've tried and it's not working, please see my update –  London Feb 8 '12 at 10:38
    
If you want to transfer file from Box A to Box B then generate the key in Box A and then add the key to the authorised_keys file in Box B. So whenevr you connect from Box A to Box B you need not type the password. Please confirm whether you have done the above –  Raghuram Feb 8 '12 at 11:06
add comment

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.