-3

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?

1
  1. login server1 with the user, which will scp files.
  2. ssh-keygen -t rsa
  3. ssh-copy-id <user>@server2
  4. Test if you can ssh from server1 to @server2
  5. Done.
| improve this answer | |
1

the internet is full of answers to your question. On unix like machines, google for keyword. ssh-keygen, running that command for example as : ssh-keygen -t rsa on server 1 will give you two files id_rsa and id_rsa.pub. You save id_rsa into your $HOME/.ssh and you copy id_rsa.pub to server2:$HOME/.ssh/authorized_keys. Make sure the permission are 0600.

Nonetheless I did a quick google just to see what you would find on the topic and here is 1 which takes the case where your server 1 may be windows as well. : http://www.mtu.net/~engstrom/ssh-agent.php

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.