Re: OpenSSH multiple private key question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 9/26/07, Von Landfried <centos.list@xxxxxxxxxxxxx> wrote:
> I am using CentOS 4.5 with OpenSSH_3.9p1 and I am curious if anyone
> has a solution for this scenario. I have several pub/priv keys that I
> use for various tasks/reasons. My issue is that I want to have 2
> private keys stored in ~/.ssh/ and I am not sure the best way to
> accomplish that. Currently I am using ssh-agent, and it works fine
> for manually performing tasks. I was curious if there is a simple way
> to have multiple private keys stored in the same ~/.ssh/ directory
> without using ssh-agent? Thanks for reading.


You can create a ~/.ssh/config file with host shortcuts that specify
specific keys for specific hosts. This would seem to be what you're
trying to do. You can also set default usernames for each host in case
you don't have common accounts on all boxen.

Sample below:

Host yourbox
HostName yourbox.example.com
User snuffy
IdentifyFile ~/.ssh/some_private_key.rsa

Host someotherbox
....



-- 
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux