How To Use Multiple Ssh Keys?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/use-multiple-ssh-keys/
PINTEREST
PINTEREST
INSTAGRAM

I work on  Ubuntu and want to use multiple ssh keys to connect different serves. I have tried some different method but unluckily they have failed. How can I use multiple ssh keys?

Multiple Hosts Multiple Keys

Ssh config resides in .ssh/config file in user home directory. The magic is here.

Hostname cen1.example.com is the hostname of the remote system. While connecting to this system with IdentityFile ~/.ssh/cen1_rsa configuration makes to use cen1_rsa as key.

Multiple Keys Same Host

This is usefull alternative for key usage too. We want to use multiple keys for same host. As we know ssh is tries related keys for hosts in sequence. We can define new keys with Identity configuration like below

Here IdentityFile ~/.ssh/ubu1bak_rsa is added alternate private ssh for host ubu1.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/use-multiple-ssh-keys/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  Man Command Usage With Examples For Linux and Unix

Leave a Reply

Your email address will not be published.