PuTTY wish dll-frontend

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

summary: SSH client packaged as a DLL for use in other programs
class: wish: This is a request for an enhancement.
difficulty: tricky: Needs many tuits.
depends: remove-statics
blocks: vb-control
priority: low: We aren't sure whether to fix this or not.

A lot of people ask for a DLL that implements an SSH client, so that they can include it in their own programs and automatically get securely in touch with other systems and issue commands.

I'm not entirely sure when (or whether) we'll have the energy to get round to this, but I've thought about the design aspects a fair bit, and this is what I've come up with.

When I hear "DLL for PuTTY" I tend to think of something very much like Plink, but using a very simple sort of function-call interface rather than reading from stdin and writing to stdout. Something like this:

  SSH_Session mysess;
  SSH_Channel mychan;
  mysess = puttydll_open("myhost.example.com", 22);
  mychan = puttydll_start_command(mysess, "cvs server");
  puttydll_send_data(mychan, cvs_auth_data, len);
  len = puttydll_read_data(mychan, buffer, sizeof(buffer));

... and so on. So you'd end up with `SSH_Channel' handles which worked a little like file handles - you could do a blocking read on a particular one of them, for example, or wait until one of a selection of them became ready. (If you wanted to wait for data from either an SSH channel or a Windows-side object, interfacing between this sort of select() and the Windows equivalents might be fun, but I'm sure it could be worked out. Perhaps an API function which would hand you a Windows event object that would get set when one of the channels was active.)

The biggest immediate problems I see with it are:

However, none of those issues is insurmountable, and once they're taken care of I don't see why a DLL providing an API like the one above shouldn't be perfectly possible to write just by implementing a single front-end module to replace (say) plink.c.

There's a third-party DLL encapsulation, W-PuTTY-CD, on our Links page.

If you want to comment on this web site, see the Feedback page.
Audit trail for this wish.
(last revision of this bug record was at 2008-07-22 14:11:17 +0000)