I need to transfer files from machine 'A' to machine 'B' and I'm executing the command from machine from 'C'.
Run Command :
$sshpass -p 'password_for_a' ssh -A -t a@x.x.x.x rsync -avz /home/test/* b@x.x.x.x:/home/test/
This prompts the "Password
" for machine "B" which i do not want to type manually. I cannot install "sshpass" on machine "A" because i don't have authorization to install lib/packages.
Is there anyway to include the password using rsync
/scp
for the above command ?
I tried passing password using 'scp
' 'PreferredAuthentications
' too.
$sshpass -p 'password_for_a' ssh -A -t a@x.x.x.x scp -o PreferredAuthentications="password_for_b" /home/test/* b@x.x.x.x:/home/test/
I'm getting ,
Permission denied (publickey,password).
lost connection
If i am wrong anywhere , Please correct me ?