Home |
Licence |
FAQ |
Docs |
Download |
Keys |
Links
Mirrors |
Updates |
Feedback |
Changes |
Wishlist |
Team
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.
Audit trail for this wish.
| Provided by Onino - product information, price comparison and reviews on: Software, Radar Detectors, DVD Recorders, Music, Garden, Kettle Shop, and more. Also see Electrical Goods and Computing Shop. |