Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 13 down vote accepted

Your problem is you are doing it backwards. Your friend is to generate his key and send you his 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 and you simply place it in ~friend/.ssh/authorized_keys

share|improve this answer
Thanks, will go look for docs on puttygen and importing his pubkey to the server – Rob Cowell Dec 4 '10 at 10:52
It goes in ~friend/.ssh/authorized_keys. I have revised my answer. – jcm Dec 4 '10 at 10:54
Awesome, thanks – Rob Cowell Dec 4 '10 at 10:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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