Super User is a question and answer site for computer enthusiasts and power users. 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

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 


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

But I still get that annoying prompt for password :

user@remotehost's password:

Any other suggestions that I try ?


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 Feb 21 '12 at 2:02

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

Looking at the link it seemed to be opposite to what I normally would do. Read this link : 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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .