Just touch GitHub, follow Liao's tutorial http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000
The first time you operate SSH key there, no problem.
However, the teacher's new project, not on the github.com, hanging on the coding.net, so on the coding.net also set up SSH key.
Thus, a series of problems arose, the essential reason is that coding.net read the original dedicated to GitHub ~/.ssh/id_rsa;
And what I need now, of course, is to let Coding.net read ~/.ssh/id_rsa_coding.
Naturally, if I clone the repository, it must fail:
git clone [email protected]:xxx/xxx.git
It would be glorious to get a pemission denied.
Specific practices:
I refer to the http://www.cnblogs.com/fanyong/p/3962455.html ....
However, there is one of the most harmful operations in this, which is
“
If you are prompted "Could not open a connection to your authentication agent" When you execute Ssh-add, you can now execute the command:
$ ssh-agent Bash
Then run the Ssh-add command again.
”
I am in this machine (including some other people I see some posts) to lose this command at all no, pit Dad no limit, about this command I also checked, in short, does not work.
My way of handling:
Skip this step directly, then create a new config file and populate the content by Http://www.cnblogs.com/fanyong/p/3962455.html Post sample
VI Config
Here is the contents of my config file (already successful)
#githubHost github.comhostname github.compreferredauthentications publickeyidentityfile ~/.ssh/id_rsa# Coding.nethost coding.nethostname coding.netpreferredauthentications publickeyidentityfile ~/.ssh/id_rsa_coding
Then, the final test:
[Email protected] ~/.ssh$ ssh-t [email protected]warning:permanently added the RSA host key for IP address ' 192.30.252.1 "To the list of known hosts. Hi ***! You've successfully authenticated, but GitHub does not provide shell access. [Email protected] ~/.ssh$ ssh-t [email protected]permission denied (publickey). [Email protected] ~/.ssh$ ssh-t [email protected]coding.net Tips: [Hello!] You ' ve connected to coding.net by SSH successfully! ]
How to manage multiple ssh keys within a ~/.ssh/folder on a single machine