13

I've got a friend that I trust enough to give ssh access to one of my servers. To this end, I've created a user account for him.

The box is accessible by key authentication only, not passwords. I've created a private key for that account, but if I send it to him over email, we kinda lose the point of the strong(er) security

What's the best way of giving him access to this account without having to resort back to password authentication?

Additional difficulties : he's on a Windows box, but easy enough to install PuTTY

1 Answer 1

15

Your problem is you are doing it backwards. Your friend is to generate his key and send you his id_rsa.pub. His private key is only for him. That's what makes it private. Once anyone but you has access to your private key it's compromised and you need to generate a new pair.

Your friend can create his key pair in windows with puttygen.exe. Once that is done he can send you his id_rsa.pub and you simply place it in ~friend/.ssh/authorized_keys

2
  • Thanks, will go look for docs on puttygen and importing his pubkey to the server
    – Rob Cowell
    Dec 4, 2010 at 10:52
  • 1
    It goes in ~friend/.ssh/authorized_keys. I have revised my answer. Dec 4, 2010 at 10:54

You must log in to answer this question.

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