add a publickey to server for SCP [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . 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: Use ssh-copy-id ssh to the server1 ssh server1 generate an ssh key on server1 ssh-keygen -t rsa copy this the public key to the autorized keys