We access our ubuntu server from outside over ssh this way :

ssh -i securityTier.pem -l someUsername serverDnsName

I need to create new user which will use separate *.pem file. So far i created :

sudo useradd new-user
sudo - su new-user

so new-user have default keys : ~/.ssh/id_rsa and id_rsa.pub

and i wonder how i can generate from user`s ssh private key pem file ? What's correct way in openssl to generate *.pem file for given user ?

  • OpenSSH private keys ARE PEM encoded by default. They simply don't have the extension .pem. – Zoredache May 8 '13 at 22:01

The .pem file is simply the same as the ~/.ssh/id_rsa file, just with a different extension. It can be used in the same way as the securityTier.pem file you're using with ssh -i.

It is the private key for that user.

Here's an article which explains the process quite well: http://www.cyberciti.biz/faq/force-ssh-client-to-use-given-private-key-identity-file/

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.