ssh-keygen -t rsa -b 4096 -C "mjrulesamrat@gmail.com"
ssh-add id_rsa_mjrulesamrat
Create config file and add multiple hosts to accomodate different accounts of github, bitbucket or gitlab.
vim ~/.ssh/config
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa
Host mjrulesamrat.github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa_mjrulesamrat
Other examples of different accounts:
-
mjrulesamrat.gitlab.com
-
mjrulesamrat.bitbucket.org
Add id_rsa_mjrulesamrat.pub
to github account ssh keys
cat ~/.ssh/id_rsa_mjrulesamrat.pub
git clone git@mjrulesamrat.github.com:mjrulesamrat/docker-commands.git