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

Source change:

In PLINK.C, in main(), around line 480…

* Perform command-line overrides on session configuration.

// MDM    3/21/2003 8:54:47 AM
szCommandBackup = cfg.remote_cmd_ptr;

// MDM     3/21/2003 8:54:47 AM
// WARNING! This will trash the command previously read from the command line!!

// MDM    3/21/2003 8:54:47 AM
cfg.remote_cmd_ptr = szCommandBackup;

Leave a Reply