use specific ssh key for bzr lp:

Asked by Peter Silva

I use ssh for many things, and different ssh keys for different purposes. so when I log into launchpad, want to choose a non-standard ssh private key. The public key is registered, and I can succesffully authenticate like so:

sftp -i ~/.ssh/launchpad <email address hidden>

But when I use bzr, for example:

lola% bzr branch bzr+ssh://<email address hidden>/~lightdm-team/lightdm/trunk
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
lola% bzr branch lp:lightdm
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
lola%

I could not find any method to set an alternate ssh key for use by bzr.

found this recipe: http://20y.hu/20081012/how-to-use-different-ssh-keys-for-different-services-smoothly.html

but it didn´t work for me either.

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Martin Pool
Solved:
Last query:
Last reply:
Revision history for this message
Martin Pool (mbp) said :
#1

Hi Peter,

> found this recipe:   http://20y.hu/20081012/how-to-use-different-ssh-keys-for-different-services-smoothly.html

That is what I was going to suggest you use. Can you please paste the
section of your .ssh/config? Also, try running 'ssh -v
bazaar.launchpad.net' and see if that gives you any clues.

Martin

Revision history for this message
Best Martin Pool (mbp) said :
#2

I added some instructions in
<https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair>; please
let me know if you can suggest any improvements or corrections.

Revision history for this message
Peter Silva (peter-bsqt) said :
#3

my problem was that my .ssh/config file belonged to root. the ssh -v
game me the necessary hint.

The recipe proferred in launchpad is helpful. Would be more helpful
if included the User statement, as the local and remote user names are
unlikely to be the same...

Host bazaar.launchpad.net
   User peter-bsqt
   IdentityFile /home/peter/.ssh/launchpad

Thanks for the answer!

On Thu, Sep 8, 2011 at 12:25 AM, Martin Pool
<email address hidden> wrote:
> Your question #170502 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/170502
>
> Martin Pool proposed the following answer:
> I added some instructions in
> <https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair>; please
> let me know if you can suggest any improvements or corrections.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/bzr/+question/170502/+confirm?answer_id=1
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/bzr/+question/170502
>
> You received this question notification because you asked the question.
>

Revision history for this message
Peter Silva (peter-bsqt) said :
#4

Thanks Martin Pool, that solved my question.