Ssh – new user and problems with ssh key configuration (pub vs pem files)

opensslSecuritysshssl-certificateuser-management

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
ssh-keygen 

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 ?

Best Answer

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/