I am trying to copy (scp) files from one remote server to another remote server. The remote servers are running Ubuntu and are using SSH authentication. The servers synchronise with LDAP, and all users public keys are stored on the LDAP server.
I am running a Mac with OSX Mavericks - I followed these instructions to set up agent forwarding on my Mac: https://developer.github.com/guides/using-ssh-agent-forwarding/
When I try and run the command:
luca-macbook:~ luca$ scp users@remoteserver:/home/ubuntu/file users@remoteserver:/home/ubuntu/
I get the following error:
Host key verification failed.
lost connection
Can someone tell me what I'm doing wrong?
Secondly, if I want to copy a whole directory over, do I just type the same as above and it will move all the files in the directory to or do I need to have a -R somewhere?
Thanks in advance.