Trivial story, but... Sometimes simple things are made very difficult.
Say your user is john. Put to /home/john/.ssh/github (c:\Users\john\.ssh\github\ or %USERPROFILE%\.ssh\github\ on windows) your private ssh key, set access mode read/write to just your user (chmod or, say, in Double Commander). You generate this key file through, say, PuttyGen. Then, in /home/scd/.ssh (ssh_config in c:\Program Files\Git\etc\ssh\ on windows) create a ssh_config text file and put there:
Host github.com
IdentityFile ~/.ssh/github/private-ssh
On windows: add AddKeysToAgent yes to the beginning, change ~/ to the value of %USERPROFILE%/. On Windows, this referenced key file needs to be converted to OpenSSH format.
Done.
Say your user is john. Put to /home/john/.ssh/github (c:\Users\john\.ssh\github\ or %USERPROFILE%\.ssh\github\ on windows) your private ssh key, set access mode read/write to just your user (chmod or, say, in Double Commander). You generate this key file through, say, PuttyGen. Then, in /home/scd/.ssh (ssh_config in c:\Program Files\Git\etc\ssh\ on windows) create a ssh_config text file and put there:
Host github.com
IdentityFile ~/.ssh/github/private-ssh
On windows: add AddKeysToAgent yes to the beginning, change ~/ to the value of %USERPROFILE%/. On Windows, this referenced key file needs to be converted to OpenSSH format.
Done.
No comments:
Post a Comment