New SSH key Generation
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"For each host/service I use a named key, here the example for GitHub:
Enter a file in which to save the key (/home/you/.ssh/id_rsa): \\
/home/you/.ssh/gitHubKey [Press Enter]
Host - Key Specific Configuration
Host github
HostName github.com
User your_git_user
IdentityFile ~/.ssh/gitHubKey
Using this configuration only the given key will be tryed, however the URL must be corrected to use github instead of github.comgit@github:your_login_name/your_repository.gitNotice: change the permissions of the file ~/.ssh/config using
chmod 644
.The result is a clean an self explanatory configuration.
No comments:
Post a Comment