I have 2 servers, Server1 and Server2. On Server1 I have a user named user1. On Server2 I have the user named user2.
I need to be able to write a script that runs on Server1, which will scp some files to user2@Server2. Is there any way to do this without prompting for a password? I can put the password in a config file or something if necessary.
I am not able to create user2@Server1 user by the way.