My scenario is this, I am trying to SCP from server1 to server2 and and I need to create a public_key on server1 to allow server2 access to it. How do I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use ssh-copy-id
ssh to the server1
generate an ssh key on server1
copy this the public key to the autorized keys file on server2 of user “username”
logout from server1
Now you can login via ssh to server2 as username (or do scp stuff) from server1 without password.
For the other direction repeat the steps but switch the servers.