-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?

2 Answers 2

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.
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .