Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Thomas Petersen on November 25, 2003, 02:53:42 AM

Title: CVS over SSH problems
Post by: Thomas Petersen on November 25, 2003, 02:53:42 AM
Hi
I am trying to access a CVS Repository on my SME 5.6 server using SSH with privat-public key access from a Windows XP client.

I have implemented this (I believee) according to every available How-to listed in this forum (and on the Internet) but I really can't get it to work.
I have tried both with Tortoise CVS and Win CVS.

My problem is to get the server to accept public-privat key access when accessed through the CVS Clients on windows.
I always get:
"cvs checkout: warning: unrecognized response user@server's password:
' from cvs server "

Facts:

I have created public-private key pairs using PuttyGen and installed on SME server according to standard. I have tried all 3 available SSH protocols from Putty.
No pass phrase. Everything works like a dream, when I logon using Putty or Plink from command line.
Have also tried with pass phrase and peageant. Works just fine.

CVS server is running. When having "access using standard passwords" enabled on the SME server, I can access CVS rep. from TortoiseCVS when typing in the user password which I am errouneous prompted for. (but I dont want that enabled, and it won't work from WinCVS)

It looks to me like the CVS clients are newer aware that the connection should be established using public-private keys and not passwords. I have of course indicatede this In every possible way in the setup. I have tried various command line options for plink in WinCVS preferences like: -1 -2 (according to used encryption), -ssh  -v ( and a few more quite far fetched) Nothing changes. Also set the env parms: CVSROOT='user@server:rep' , CVS_RSH=ssh and relevant path.

Since I feel I have nothing more to try, ANY help would be GREATLY apprichiated .

Thanks Thomas
Title: Re: CVS over SSH problems
Post by: grub on November 26, 2003, 03:04:01 AM
when connect... what did the debug output say...if you did verbose?
Title: Re: CVS over SSH problems
Post by: Thomas Petersen on November 28, 2003, 02:58:27 AM
Grub wrote:
when connect... what did the debug output say...if you did verbose?


Yes I have tried the -v option on plink.
I still get

cvs checkout -P CVSROOT (in directory Z:\cvswork)
cvs checkout: warning: unrecognized response thomas@fure.dk's password:
' from cvs server
cvs checkout: warning: unrecognized response thomas@fure.dk's password:
' from cvs server
cvs checkout: warning: unrecognized response thomas@fure.dk's password:
' from cvs server
cvs checkout: warning: unrecognized response thomas@fure.dk's password:
' from cvs server

After that the server has to be stopped manually. I suppose it is wating for password.
I dont think plink is using ssh at all.

Thomas
Title: Re: CVS over SSH problems
Post by: ian wells on November 29, 2003, 02:17:53 AM
Thomas

are you still having problems?

If so which version of Tortoise CVS are you using?
I don't have an answer for you, but I can try to help if you are still stuck.

Ian
Title: Re: CVS over SSH problems
Post by: Thomas Petersen on November 29, 2003, 11:31:46 PM
Thanks Ian
Yes I am still stuck even though I have been giving it several new shots.
I would really apprechiate some input. I really think I have setup everything according to your Howto's, so its quite frustrating.

I'm using TortoiseCVS 1.4.5
and         WinCVS 1.3.13.2

Thanks  In advance
Thomas
Title: Re: CVS over SSH problems
Post by: ian wells on November 30, 2003, 08:00:03 PM
There are a few things to check, and I'll suggest we try to get Tortoise CVS working first as that is the one that I really use. I only use WinCVS when updating the How-To. Hopefully the problem is the same for both.

I am using 6.0b3, but I think the problem is on a PC side as you say that you can get PuTTY working.  I have verified this with TortoiseCVS version 1.4.5.

1) use PuTTY to SSH into your server. Can you see "Authenticating with public key " ?  This will verify that your SSH access is working, as well as your Key-pair for that given user.

2) If Tortoise CVS is promting for the password then it cannot find a valid key file:
* On WinXP are you logged on with the same user name that you have set up the KeyPair for? So if you set up the Key-Pair for "smith" on the server, are you logged into WinXP as "smith" ?  Tortoiseplink sends the currently logged in user name.

* Do you have Pagent running? TortoisePlink requests the key from Pagent and will ask for a password if Pagent is not running.

* Do you have a Key loaded into Pagent? Choose View Keys from Pageant to see if the Key is there. If there is no key listed, or the listed key does not match the key on the server then you will get the error you describe.  In the first column does it say ssh-rsa to indicate a SSH2 RSA key?

Other items to check, but should not give quite the error you mention.
3a) Check CVS-Preferences-SSH
Does it point to "TortoisePlinkSSH2.bat" and is that file really there? (I presume that you want to use SSH2)

3b) "TortoisePlinkSSH2.bat"
This file is not auto-generated so may have the wrong path in it.
Can you check that the path is correct (eg)
@c:\progra~1\tortoisecvs\tortoiseplink -2 %1 ...

If this does not help it may be time to start increasing the logging of sshd.
I am fairly confident that the problem is related to using the correct username and Keys for CVS. When using PuTTY you can specify the private key file and the username. When using TortoiseCVS it uses the current login-name, and asks Pagent for a key-file (I don't know how it determines which key to use).  It is likely that the problem is here.
Title: Re: CVS over SSH problems
Post by: Thomas Petersen on December 01, 2003, 06:28:49 PM
So far so good

Many thanks Ian

I got Tortoise to work. Everything was rigth except pageant was not running. I did not think I needed this since I use no passphrase. I see why know.

WinCVS is still no go even wiht pageant running.

I am still getting the aforementioned password error. Something is preventing use of the private key when plink is called from within WinCVS. I use the same ssh2 key pair that works for Tortoise.

You might say that I could do with tortoise, but I am much more used to WinCVS (over pserver, that is). For instance is it true that you have to keep your sandbox modules in the home directory to have CVS Icons updated ?
Also modules seems to be handled somewhat different.
Anyway, I would still very much apprechiate if you would have some advice also regarding WinCVS connection. Problem seem to be the same, with a different flavour.

BTW: What is it with the ":ext:" preposition on the CVSROOT string in tortoise ?
I tried using that in WinCVS as well, but it doesnt change anything.

BR Thomas
Title: Re: CVS over SSH problems
Post by: ian wells on December 02, 2003, 01:52:27 AM
Glad to hear that one problem has been solved.

:ext: means that SSH will be used as the protocol instead of something like pserver.

Using TortoiseCVS you can put your sandboxes anywhere. The only recommendation is that they are not on a UNIX drive.

However let's try to get WinCVS working.  I have reproduced the error message in one scenario.

I will assume that when you go to Admin - Preferences you see something like the figure in  http://www.wellsi.com/sme/cvs/wincvs.html

Authentication is SSH, and the Host-address is a "Pageant session name"

In SSH options you have the correct path to plink.exe and the additional options contains only -2 (to force SSH2)

Now check the "Pageant session name":
From Pageant Select Saved Sessions and then the name that you use. Does a PuTTY terminal open with no further interaction and it shows either (both are OK I think for this discussion):

Authenticating with public key ".something."
(This indicates that it read the key from a file)
or
Authenticating with public key ".something." from agent
(This indicates that it used the key already loaded in Pageant)

If this works then WinCVS should work...

Did you see my PuTTY page: http://www.wellsi.com/sme/cvs/putty.html It shows how I created the session that I use for WinCVS.

I reproduced your error in one scenario only.
When creating your Pageant session name, which is a PuTTY saved session what SSH configuration did you use?
The default is 1 but when using -2 in WinCVS this should be 2 only. If this does not match then you will get the error:

warning: unrecognized response user@server's password:
' from cvs server

I hope that this helps. I will be travelling for the next two days.

Ian Wells
Title: Re: CVS over SSH problems
Post by: Thomas Petersen on December 03, 2003, 02:14:20 AM
That did it. WinCVS is up and working.
Maybe I need to learn how to read how-to's again, since it was all there in in Your great docs.
I newer realised I HAD to use pageant also for wincvs. I gave the the private key directly using the RSA switch in the ssh option dialog and specifying the actual server as host. This is how it is described in other How-to's , but NOT in yours. Shame on me.
I dont now why this does'nt work from WinCVS since it does from plink command line using the -i option, but fact is fact.

BTW the putty session name has to be one word to work form WinCVS even though putty can use a phrase.

So ones again Ian, my sincere thanks for guide me by the hand through this.

The amount of help guys like me can get from guys like you in this forum continues to amaze me.