First I am fairly new to SSH.
From this question I have seen the need and benefit of setting up an SSH config file. While I was doing my research I noticed that there is a lot to know on SSH and I also found out that I have been using SSH keys and not the SSH server. I have been using the keys to push my code to my hosted repos.
So now my questions are(I am using windows 10):
Generally, in Windows machine, the SSH config file stored in the following location: /c/Users/PC_USER_NAME/.ssh/
Just follow the steps in below (if you're using the Git Bash):
/c/Users/PC_USER_NAME/.ssh/
, click right mouse button and choose "Git Bash Here"touch config
nano config
Let's assume you've created two files named id_rsa_hub
for Github and id_rsa_lab
for GitLab
# GITHUB
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_hub
# GITLAB
Host gitlab.com
HostName gitlab.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_lab