net-ssh/net-ssh — pull request #66 by factormystic (2012-11-16 23:20:14+00:00)
Title: Get agent forwarding working on Windows (with Pageant)

I see two potential paths to get agent forwarding working here;
- Make Pagaent::Socket / Pageant::Socket19 more like actual sockets (inherit from IO & operate correctly with IO.select)
- Accept that they aren't real sockets and patch the code that uses Pageant classes accordingly

Because it seemed easier, I went with option two, which does work. The main downside of this approach is that it's somewhat hacky and require any other libraries that reach into Net::SSH to be aware of this consideration (namely Capistrano, for which I have also submitted a pull request).

On the other hand, it's a relatively patch... turns out after all these years it didn't take that much to get agent forwarding to work on Windows after all.

Here's a simple connection testing script for those interested https://gist.github.com/4091377