Multiple ssh private keys

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

In .ssh directory, if there is a config file, ssh keys can be controlled by it.

For example, ~/.ssh/config would be

Host *.home.lan
  IdentityFile ~/.ssh/id_dsa.home
  User kbsingh

Host *.vpn
  IdentityFile ~/.ssh/id_rsa.work
  User karanbir
  Port 44787

Host *.d0.karan.org
  IdentityFile ~/.ssh/id_rsa.d0
  User admin
  Port 21871

id_rsa.xx is the private key.

You May Also Like

1 Comment

Leave a Reply

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