unable to authenticate with public key

Asked by Emmanuel Lambert on 2009-08-24

The PUSH command is not working because BZR doesn't seem to be able to do the SSH authentication.

I keep getting the "Permission denied (public key)" error :

emmanuel@emmanuel-ubuntu:~/Software/Download/meep_install/python-meep-launchpad/devel$ bzr launchpad-login elambert
emmanuel@emmanuel-ubuntu:~/Software/Download/meep_install/python-meep-launchpad/devel$ bzr push lp:~nizamov-shawkat/python-meep/devel
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
emmanuel@emmanuel-ubuntu:~/Software/Download/meep_install/python-meep-launchpad/devel$

Also, simple SSH doesn't work :

emmanuel@emmanuel-ubuntu:~/Software/Download/meep_install/python-meep-launchpad/devel$ ssh -v <email address hidden>
OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to bazaar.launchpad.net [91.189.90.11] port 22.
debug1: Connection established.
debug1: identity file /home/emmanuel/.ssh/identity type -1
debug1: identity file /home/emmanuel/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/emmanuel/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version Twisted
debug1: no match: Twisted
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5ubuntu1
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: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host 'bazaar.launchpad.net' is known and matches the RSA host key.
debug1: Found key in /home/emmanuel/.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: Offering public key: /home/emmanuel/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/emmanuel/.ssh/identity
debug1: Trying private key: /home/emmanuel/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).

I re-generated the public keys a dozen of times, both RSA and DSA (and re-uploaded to launchpad), none seem to work.
I've set the persmissions on the .SSH files :

emmanuel@emmanuel-ubuntu:~/Software/Download/meep_install/python-meep-launchpad/devel$ ls -l /home/emmanuel/.ssh
total 12
-rw------- 1 emmanuel emmanuel 1671 2009-08-24 10:11 id_rsa
-rw-r--r-- 1 emmanuel emmanuel 406 2009-08-24 10:11 id_rsa.pub
-rw-r--r-- 1 emmanuel emmanuel 540 2009-08-24 10:12 known_hosts

How can I find out what is wrong?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu bzr Edit question
Assignee:
No assignee Edit question
Solved by:
Emmanuel Lambert
Solved:
2009-08-25
Last query:
2009-08-25
Last reply:

I would appreciate if anyone could help me with this. I've been struggling with it for 2 days now and to no avail. Anyone a suggestion? Thanks a lot.

ok, I found the solution.
It turns out that Launchpad expects the PPA username, not the original username that is still displayed as username !!!

Xabi (xabii) said : #3

And how did you do that? can you tell me please?

Vincent Ladeuil (vila) said : #4

@Xabi: Do what ?

Inform bzr to use a username ? 'bzr launchpad-login --help'

Find which username launchpad associate to your displayed name ? Look at the urls related to your overview page or edit your personal details, both the name and the display name are displayed there.

Koketso Mabuse (koketso) said : #5

I tried all above to no avail. I checked the username and to no avail. Is there are way remove login details and maybe re-enter them?

Koketso Mabuse (koketso) said : #6

Ok I managed to see my fault and fixed it, I reinstalled my system but on the previous system install I had use a different name for my PC so what i had to do was to recreate a new key and replace username and the RSA key as well.

Ta! Folks.