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. -Von
On Wed, Sep 26, 2007 at 02:42:51PM -0400, Von Landfried 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 name them whatever you want, then add to ~/.ssh/config, at the end: host * identityfile ~/.ssh/key1 identityfile ~/.ssh/key2 You can also restrict by host instead of a global definition, of course. -- lfr 0/0 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20070926/e705e5d6/attachment-0001.sig>
Perfect, I knew it was possible, and I was familiar with ~/.ssh/ config, just currently only use it for different port settings. Thanks Luciano!!!! On Sep 26, 2007, at 2:51 PM, Luciano Rocha wrote:> On Wed, Sep 26, 2007 at 02:42:51PM -0400, Von Landfried 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 name them whatever you want, then add to ~/.ssh/config, > at the end: > > host * > identityfile ~/.ssh/key1 > identityfile ~/.ssh/key2 > > You can also restrict by host instead of a global definition, of > course. > > -- > lfr > 0/0 > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
On 9/26/07, Von Landfried <centos.list at eyestreet.com> 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
Apparently Analagous Threads
- Ssh with OS X Tiger (Darwin) and CentOS 4.2
- Problems using gssapi authentication from FreeBSD to Linux machines
- augeas onlyif problem
- [Bug 1898] New: possible unreasonable behaviour when using ProxyCommand with multiple IdentityFile(s)
- IdentityFingerprint feature request