Eclipse, SSH and PuTTY

Yesterday was a great day for me: been accepted as a commiter to AspectWerkz project (thanks again Alex and Jonas, you are just great! – I will write more about this some other time).
And now the short story: I got to set up my environment to access CVS using SSH with keys. I think every developer has successfully done this once – this is why I’ve been a little pissed off. I have generated the keys using ssh-keygen and than another pair with PuTTY. By looking at them I have noticed that they are very differnt. Why this?
But let’s continue. Finally the PuTTY generated public key was placed on the server and now the long series of tries begun: ssh client (from cygwin) was refusing to connect. Turning verbose mode on (you place up to 3 -v options in the command line) I have found out that indeed the private key was not recognized. I have gone back to using PuTTY and I have successfully logged in.
Next step would be having WinCVS and Eclipse connected. In order to shorten the story, I made WinCVS work with Pageant and ssh protocol (i didn’t know about it, and I don’t think this is correct – as I should use ext or extssh protocol). With Eclipse, I have successfully connected using plink and ext protocol but not with Eclipse SSH support and extssh protocol (probably because of the keys incompatibility, it was failing to connect with an unpleasant/non-explicative message: Auth fail).

I would like to find out what I was doing wrong and how I can do the following:

  • make WinCVS work with ext or extssh protocol (probably using plink)
  • make Eclipse extssh connection work (so not using plink)

A very nice solution for CVS is also TortoiseCVS (thanks Alex for the suggestion. It works nice with pageant).

Update: Euxx has posted more hints on Eclipse and CVS usage.



Filed under Uncategorized

3 responses to “Eclipse, SSH and PuTTY

  1. Slava

    There is PuTTy Key Generator (PuTTyGen) utility in the PuTTy package. By using this utility you may convert your PuTTy keys to another formats. Just do the following:
    1. Load your PuTTy private key
    2. Export it to OpenSSH format through
    menu Conversations->Export OpenSSH key.
    After that you may use key in OpenSSH format at Linux (and Cygwin of course)
    and Eclipse.
    Then in Eclipse do the following:
    1. In Preferences->Team->CVS->SSH2 Connection Method choose Key Management tab push ‘Load existing key…’ and choose key in OpenSSH format
    2. At the same tab enter passphrase 2 times and click ‘Save Private Key…’ and save it to {your_home_dir}/ssh directory
    3. Choose tab ‘General’, click ‘Add Private Key…’ and choose key you just saved to {your_home_dir}/ssh directory
    4. Switch to CVS Repository Exploring perspective and setup your
    repository for using extssh connection method

    Enjoy Eclipse!

  2. the_mindstorm

    Excellent tips Slava. You saved my life! [blink/]. Many thanks.

  3. wonderchild

    this isn’t actually working for me – I’m using eclipse 3.02 on windows, cvs v1.11 running on sun solaris, and each time I try adding the cvs repository in eclipse i get an error: validating location: “unknown reposonse received from CVS server: “. it appears that extssh is reading the public key from my {home_directory}\ssh\known_hosts file. any help would be greatly appreciated. thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s