Transfer Files to another host without password prompt
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
Related videos on Youtube
London
Updated on September 18, 2022Comments
-
London over 1 year
Hello I've tried both
scp
andrsync
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).
-
Admin over 12 yearsdo I need a root access for this on the remote machine?
-
Admin over 12 yearsNo...If you have an id with which you can login to the box then you can do the steps mentioned in the link
-
Admin over 12 yearsso I guess my machine is client and the machine I'm copying to is a server?
-
Admin over 12 yearsI've tried and it's not working, please see my update
-
Admin over 12 yearsIf 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