Unable to add SSH pub key for GitHub
Posted
by
Kaushik
on Stack Overflow
See other posts from Stack Overflow
or by Kaushik
Published on 2011-01-02T00:29:56Z
Indexed on
2011/01/02
4:54 UTC
Read the original article
Hit count: 400
I am trying to set up a new GitHub account as part of learning ruby on rails. My OS is windows. I am having the following problem while trying to add my public key to the GitHub SSH public keys.
When I put the key in the text area, supply a name, and click 'Add Key', I am taken to the Job profile page without any confirmation that the key has been added.(I am using SSH client GUI to generate RSA keys).
When I come back to the SSH public keys page, I see that the key is not there. I tried this multiple times...without any result.
Just as a test, I tried to ssh to the GitHub account using 'ssh -v [email protected]' and here is the verbose output:
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Administrator/.ssh/identity type -1
debug1: identity file /c/Users/Administrator/.ssh/id_rsa type -1
debug1: identity file /c/Users/Administrator/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /c/Users/Administrator/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/Administrator/.ssh/identity
debug1: Trying private key: /c/Users/Administrator/.ssh/id_rsa
debug1: Trying private key: /c/Users/Administrator/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
Also, why is it looking for the keys in c/Users/Administrator/.ssh/
Is there a possibility of changing this default location?
EDIT: With Mozila, I get error msg: Oops! The key has already been taken. The key is invalid. It must begin with 'ssh-rsa' or 'ssh-dss'.
My key looks like:
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "[2048-bit rsa, Administrator@Kaushik-THINK, Sun Jan 02 2011 \
02:40:03]"
AAAAB3NzaC1yc2EAAAADAQABAAABAQDoA5xqJozKmAHTGh9hgmagsFOl2hdPzS8ZPV9Ta1
xU0JiUnHef38Rvz/5oqL1wW7SjmZbc/+tCPOfU1lg3UisFXajJhek2bjJ2qsKd4Sjax2Nj
ZMYD7djPb8rokUYSKW3bdYyJHtJH+murz04UGdCcZ8HqkMTzqlh3zAIK7SIlCy+mtAi5A/
sm0JbqlNGHB6YrL1aWIcOSolIx2HWt8cWhlK77guT9dPgd0HT59Gn0uhO7UWGLrNdJut0x
ian3HdvNYMUXoO/SkNlxvWRgZ1UOhaB+qf4hw5RCGcBbqP3fM4LKpurHZx4wEpgmM0e4EM
+2PYdf46uxChNdBl7J5sZF
---- END SSH2 PUBLIC KEY ----
I still can't see the key..so not sure how it says it is already taken.
© Stack Overflow or respective owner