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 *
       IdentityFile ~/.ssh/namran.home.keys
       User namran
       Port 1111
host *
       IdentityFile ~/.ssh/
       User namran
       Port 1222
       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 :

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

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.


Related Post

2 Responses

  1. skyb37 says:


    bole terangkan skop kerja anda..tertarik la.

  2. Moorthi says:

    ## add the below filter & comment the last 2 lines in lvm.conf file

    filter = [ “r|/dev/disk.*|”, “r|/dev/sd.*|”, “a/.*/” ]

    #filter = [ “a|/dev/sda[0-9].*|”, “r|/dev/disk.*|”, “r|/dev/sd.*|”, “a/.*/” ]
    #filter = [ “a/.*/” ]


Anything to add?