Setting Up multiple SSH key for different machine

The most valuable thing would the the keys itself..
luckily got backup elsewhere ..

the customization to add for its to select correct keys for each machine..
simply create a file at “~/.ssh/config”
with content as such..

host skynet*
       IdentityFile ~/.ssh/namran.skynet.keys
       User namran
 
host *.home.namran.net
       IdentityFile ~/.ssh/namran.home.keys
       User namran
       Port 1111
 
host *.dev.namran.net
       IdentityFile ~/.ssh/namran.dev.keys
       User namran
       Port 1222
 
host 192.168.199.100
       IdentityFile ~/.ssh/ae.keys
       User root

make sure the permission is correct for each keys and also config.

chmod 600 ~/.ssh/config
chmod 600 ~/.ssh/*.keys

then.. login to those machine..
would be as easy as

[namran@nb-namran]$ssh -l root ae
[root@AQ ~]#

source :
http://www.karan.org/blog/index.php/2009/08/25/multiple-ssh-private-keys

p/s : yeah… finally written about this..

Related Post

3 Responses

  1. ahstod says:

    Copy the /boot/config.2.6.x.x.x.el5 from centos into your kernel source directory as .config, and “make oldconfig” … and them make menuconfig and tweak from there. That brings your kernel config as close to the original centos settings as possible …

    Reply
  2. gratis downloaden says:

    Hey, ok, I get it, I guess – but does this really work?

    Reply
  3. namran says:

    well.. it worked for me..

    much depend on how did u want to use it..

    … this is just another note for me.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *