[CentOS] PKA help

Jay Leafey jay.leafey at mindless.com
Wed Aug 3 18:21:24 UTC 2011


On 08/03/2011 12:51 PM, Todd wrote:
> Hi All,
>
> I was able to create a public key for one of my servers that I log into
> frequently.
>
> Now I want to do this for a few more servers (where I use the same user
> id) and my user id on my laptop is the same as the servers.
>
> I also want to use PKA for other users accounts on the servers (for
> website editing and SFTP transfers) where my id on my laptop does NOT
> match the user on the server.
>
> I dont see at all how to make these changes as I already have an id_rsa
> and id_rsa.pub.
>
> So as an example:
>
> my user id on my laptop is: jtsm and the user id i want to log into the
> server as is: wwwdata
>
> Can anyone shed some light on how to setup multiple PKA on a single
> laptop with a single user account connecting as multiple user accounts
> to the server?
>
> -Jason
>

Since you've already generated an SSH key pair, you can add the public 
portion of your key to the authorized_keys file for each of the accounts 
to which you will be connecting.  For example, say I have two accounts 
on a server, jleafey and webapps.  All I would need to do is to 
concatenate the public key (id_rsa.pub) to the .ssh/authorized_keys file 
for each of those accounts.  I would then specify the username when I 
connect, i.e. "ssh webapps at server" or "ssh jleafey at server".

This is very easy to do if you are using the OpenSSH client.  If you are 
using Putty under Windows there is a configuration entry where you can 
specify the username under which you are connecting.

YMMV!
-- 
Jay Leafey - jay.leafey at mindless.com
Memphis, TN

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3937 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20110803/232dedb5/attachment.p7s>


More information about the CentOS mailing list