UPDATE: This is no longer an issue in more recent Putty releases.

Putty’s plink.exe is an ssh Windows command-line tool that’s great for scripted access to CVS. It is used behind the scenes by TortoiseCVS. There are lots of options available to establish the SSH connection, including going through a proxy, and these are stored in a “session”. However, if you try to load a session from the command line, so you can get proxied CVS access, plink.exe ignores the rest of the command line.

I got the source for plink.exe and patched it to work for me. I am fairly sure this version will work for everyone, but not positive – I have submitted it to the Putty team for review. Here’s the patched version for now, based on the development snapshot dated 3/17/03.

PLINK session settings you should change from default:

  • host
  • auto-login
  • send timeout (typically needed to keep the proxy from dropping the connection
  • proxy
  • preferred SSH = 1
  • force local echo off
  • force line edit off
  • ssh: dont allocate pseudo-terminal

TortoiseCVS SSH command:

  • plink.exe -load session -batch

(continued…)

Recently, I installed TCL/TK and grabbed TKDiff, to see if that was an improvement over WinDiff, which is a visually crude but fairly reliable workhorse. To get TortoiseCVS to use it, I set up a batch file as the TortoiseCVS diff app (CVS->Preferences->Main->External diff app). For some reason, you can’t directly specify the .tcl file in TortoiseCVS. The batch file contains this line:

c:TKDiff kdiff %1 %2

I was interested in a smarter diff because of cr-lf problems I recently introduced while sailing back and forth across the windows/linux time-space continuum. Well, TKDiff barfed on all that. Can’t hold it against it, tho…

  • TKDiff – barfed – totally confused
  • WinMerge – barfed – totally confused
  • CSDiff – seemed to do OK, but MAN it’s tough reading one listing
  • WinDiff – did OK

    So I guess I am back where I started for now… I manually patched up the CR-LF problems, and I am back to liking TKDiff the best at this point… what a roller coaster ride, man I got a headache… to be continued…

  • I access my Linux box CVS repository from my Windows box using Tortoise CVS. It prompts you for a password all day long, which is a PITA. Tortoise CVS docs explain the possible ways to fix this. The most official way is to set up SSH to use a private key with no passphrase – as long as it finds the file, you will get authenticated. Here’s what I did:

  • Get Putty (including putty.exe, pagent.exe, puttygen.exe, and pscp.exe). Putty r0xx0r5.
  • Put the putty files in your Windows path somewhere.
  • Run puttygen.exe to generate a key. Use a blank passphrase. Don’t close the keygen screen yet.
  • Save the private key to a floppy disk, using the Save button.
  • Connect to your linux box and edit /home/#you#/.ssh/authorized_keys (creating it if needed).
  • Copy the public key from the keygen public key edit box to a single line in the authorized_keys file. Save it. chmod 744 on it.
  • Back in Windows, set up pagent.exe to run on startup, with the following command line: pagent.exe a:myprivatekey
  • Open TortoiseCVS’s SSH settings (right-click a file and select CVS->Preferences->SSH).
  • Change the SSH client from TortoisePlink.exe to Plink.exe (the version that came with putty.exe).
  • Make sure PAgent.exe is running (it lives in the task bar) and has your key loaded up, then try a TortoiseCVS operation.

    DANG, it works! Cool… now take care of that private key file! :>