User Context Switch in CVSNT / Cygwin OpenSSH sshd / RSA Authentication...
It seems to be an old problem but still remains.
I am currently using CVSNT as my projects' source control server. with Cygwin OpenSSH as the SSH layer, and client side using TortoiseCVS to interact with the server.
I'll do a post about installing the server side components if I have time (CVSNT with Cygwin OpenSSH enabled), it's little bit tricky but I've managed to get it run anyway.
Everything seems fine until recently I found from checking my source code's history. The author name was not correct as it showed the system service name instead of login user name.
A search via Google indicates the problem was caused by OpenSSH's RSA Authentication. yes, I was using public key authentication to auto login to my SSH session without entering password. and that's why it caused the author name became the service name (sshd's service account name, usually SYSTEM or sshd_server as the cygwin OpenSSH default name).
Seems the OpenSSH code for RSA Authentication still not changed since 2001. To work around this (not switch to VShell by VanDyke, which is good but needs license fee), I'll have to give up using public key authentication and switch back to password authentication. It did work, after switching back to password authentication, the author name was corrected back to the login session name (which is my name).
How to prevent manually input password everytime when TortoiseCVS initiate a cvs session via TortoisePLink.exe? The answer is to put the password in TortoiseCVS's SSH parameters in the Preferences dialogue box, under the Tools tab. the usual one is like:
SSH Parameters (:ext: only) : -l "%u" "%h"
to let the password auto input in the command, using -pw option:
SSH Parameters (:ext: only) : -l "%u" -pw your-passed "%h"
this should work-around the author name not correct problem, although not very good, since we left the password un-encrypted in the application. but it should still be ok since the command is transferred via a encypted SSH tunnel.
Now this should be a full funtional FREE and Secure CVS server under Windows 2003 platform, without big problems.
Let me know if there are better work-around, thanks.
Technorati Tags: windows , cvs , cvsnt , cygwin , openssh