I want to copy files using
scp between two remote hosts with key-based authentication.
scp -i /home/user/.ssh/id_rsa user@host1:/tmp/myfile user@host2:/tmp/
The problem is that the
host2 still prompts me for a password, even though I have copied the public key to both servers. Is there a way to make this work?