Different ssh keys for different hosts
Generate new ssh-key
$ ssh-keygen -t rsa -C "Some comment"
And add your hosts and the ssh keys to a ~/.ssh/config file like below
Host Github github.com
Hostname github.com
IdentityFile ~/.ssh/github_rsa
Host GitLab gitlab.example.com
Hostname gitlab.example.com
IdentityFile ~/.ssh/gitlab_rsa
Written by AlexDenisov
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ssh
Authors
Related Tags
#ssh
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#