X
    Categories: Linux

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..

Namran Hussin: a soft spoken guy... with exceptional interest in computers and technology. I love to learn new thing and also love to break thing for the sake of learning.. but I do abide to the self-imposed limitation or certain thing such as social thing in life, thing can be done and thing that must be avoided at whatever cost such as drug,illegal tracking, smoke,illicit activity..etc.muahahaha let's share what we had in this short term of the life.! make it worth of the living.~

View Comments (1)

  • If some one wants to be updated with most recent technologies after that he must be pay a visit this site and be up to date every day.

Related Post
Leave a Comment