I am trying to transfer files from one server to another using the scp command without having to enter a password. To this end I generated key files and copied them to each server's .ssh folder; but when I run the scp command I still need to type the password for my other server.
I am using Cloudways servers; we can't edit .ssh files on those but I added the keys using their portal and they were added to authorized_keys.
I am using this command:
scp -o StrictHostKeyChecking=no -rv /home/00000000.cloudwaysapps.com/fdbbgbgbgb/public_html/Test1/test.html [email protected]:/home/0000000.cloudwaysapps.com/bgbtrbgb/public_html/Test1 What do we need to do to automate transfers between two different servers? I already tried ssh-keygen but it didn't work on the servers. Locally I generated keys and added them to both servers manually, and with those I can log in to both servers without entering a password; I am only asked for a password when transferring files between the servers.
Can anyone explain why this is happening, and how I should configure the SSH keys of my second server on the first one?