SSH (Secured SHell) is a secure cryptographic network protocol for operating systems to let remotely access your hosting. It is used for managing networks, operating systems, and configurations. It is also inside many file transfer tools and configuration management tools. Most of the top corporation use SSH in almost every data centre. The modern web and computerised services are made cost-effective with the automation provided by SSH keys. This makes things more convenient and highly secured while handling. So, here is the blog about configuring SSH keys for multiple accounts in Github.

Benefits of SSH keys

  1. Highly secured alternative username/password authorization.
  2. Being generated in public/private keys, SSH keys lets you share your public key with others and the private key is available on the machine only.
  3. You can access your GitHub through SSH by sharing your public key.

Who Has Multiple SSH Keys?

One can say that almost every developer browsing around the web sphere have witnessed or encountered SSH in any way. SSH is used for connecting with remote servers that incorporated managing code with the help of GIT and by syncing it with remote repositories. You might be using one SSH key-pair for working on your company’s internal projects but you might be using a different key for accessing some client’s company projects in the same git account. In some cases, there are even possibilities of using different keys to access your own private server.

It helps to manage multiple SSH keys for different GitHub, GitLab accounts so that you can access multiple accounts and projects, each with different credentials.

Create a folder inside .ssh folder in a new name[ eg. New ] and paste ssh key files inside the folder.

Create a config file inside the .ssh folder and update it with the below content. Self git accounts for your own SSH key and new for newly included one, differentiate with help of Host.

Self git account

Host github.com

HostName github.com

User git

IdentityFile ~/.ssh/id_rsa

New git account

Host github.com-New

HostName github.com

User git

IdentityFile ~/.ssh/New/id_rsa

#github #ssh

Configuring SSH keys for different accounts on Github
1.25 GEEK