Problems setting up ssh on Windows

Asked by Lucius

Can't get this to work on Windows (Vista and/or Windows Server 2008) with the instructions given at http://bazaar-vcs.org/Bzr_and_SSH. Created keys using puttygen and copied them into %homepath%\.ssh\.

Instructions mentions the file names id_rsa.pub, but using filemon, I noticed that bzr.exe process attempts to open id_rsa (without the extension .pub). What are the file names of the public and private key exactly that I am supposed to use?

PuttyGen creates a file in the format (abbreviated).

PuTTY-User-Key-File-2: ssh-rsa
Encryption: aes256-cbc
Comment: rsa-key-20090118
Public-Lines: 4
AAAAB3NzaC1yc2...
...
y/sUs/s=
Private-Lines: 8
Mu+ydrj3BMhu1t...
...
8ZSOwOhNJK9dK0ptPi921Q==
Private-MAC: 040ed2662d8c14e5dbbf6b16eaf0ea3ccb52134a

Does bzr.exe know how to extract the public and private keys, or do I need to remove all those non-key text and line breaks?

Is there any debug trace, that can be enabled that tells me what bazaar is doing, i.e. where it fails?

What is recommended and why on windows: ssh or the build in smart server (bzr serve)?

Thanks a lot.
-Lucius

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
John A Meinel
Solved:
Last query:
Last reply:
Revision history for this message
Lucius (luciusf) said :
#1

Using version 1.10

Revision history for this message
Best John A Meinel (jameinel) said :
#2

id_rsa is the private key
id_rsa.pub is the public key

However, puttygen uses its own format. What you need to look for is the "openssh" export. There is a way to take the puttygen .ppk file and convert the keys to be in "openssh" format, and that is what you use as the public and private keys.

IIRC, when you have a key, it has a text box with the caption "Public key for pasting into OpenSSH authorized_keys file".

That line is what you would copy into "id_rsa.pub" and what you would upload to another site like launchpad.

Then you have the menu item "Conversions/Export OpenSSH key", and the output of that you would put into the id_rsa file.

However, if you have puttygen, you also have Pageant, which is the Windows ssh-key agent. If you just run that program, and "Add Key" your .ppk file, bzr should be able to find it directly from the agent, rather than requiring you to create the ~/.ssh/* files.

Revision history for this message
Lucius (luciusf) said :
#3

Thanks John A Meinel, that solved my question.

Revision history for this message
Emmanuel Lambert (emmanuel-lambert) said :
#4

I'm having similar trouble and just can't get it to work, neither under Windows or Ubuntu. This is extremely confusing (and frustrating).

Under windows, BZR keeps saying this :
Connected (version 2.0, client Twisted)
Authentication (publickey) failed.
SSH <email address hidden> password:

Under ubuntu, I'm having similar problems, described here : https://answers.launchpad.net/python-meep/+question/80792
can ANYONE help please? I've been loosing a lot of time with this.
Probably, the Ubuntu situation is the best documented?

Under windows, I've tried both the solution with and without pageant. None work... aargh!!

Revision history for this message
John A Meinel (jameinel) said :
#5

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

elambert wrote:
> Question #58400 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/58400
>
> elambert posted a new comment:
> I'm having similar trouble and just can't get it to work, neither under
> Windows or Ubuntu. This is extremely confusing (and frustrating).
>
> Under windows, BZR keeps saying this :
> Connected (version 2.0, client Twisted)
> Authentication (publickey) failed.
> SSH <email address hidden> password:
>
> Under ubuntu, I'm having similar problems, described here : https://answers.launchpad.net/python-meep/+question/80792
> can ANYONE help please? I've been loosing a lot of time with this.
> Probably, the Ubuntu situation is the best documented?
>
> Under windows, I've tried both the solution with and without pageant.
> None work... aargh!!
>

You need to have generated an ssh key pair and uploaded it to Launchpad.
And then have added that key pair to pageant. (there are a few other
ways of doing it on Windows, but that is the easiest.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqUNcMACgkQJdeBCYSNAAOhEwCfTyQS1WOAD7JDCfkuIi1OlPcD
OiUAoI4ASwlrXaPmOVSktGSL0QIa1P5K
=tHwg
-----END PGP SIGNATURE-----

Revision history for this message
Emmanuel Lambert (emmanuel-lambert) said :
#6

Yes John, I've done that multiple times, both from Windows (using pageant and using the .ssh directory alternative) and Ubuntu, but it just doesn't work. How can I further debug this?