I'm now using msysgit because of the GUI tools, which use Putty's Pageant and PLink utilities, but I use Cygwin as a general SSH terminal. I had been using ssh-agent on Cygwin, but that means I have to enter my SSH key passphrases for both SSH key managers. Is it possible to configure all my Unix-port tools (msys, git, cygwin, Ruby Net:SSH, etc.) to use PLink/Pageant instead of ssh-agent? It seems that's the kind of thing PLink was made for, but I can't find documentation on how.

i would suggest the same thing (use putty) but just use putty as it intergrates better with pagent and plink, i use it along with msysgit but use the git bash provided by msysgit and it would fine, its a little tedious switching between consoles but the seperation can be good as well

I can't leave Cygwin, unfortunately. I depend on some of the packages it provides, not just pure ssh console stuff. Msys has its strengths ("better" integration with many Windows tools and the Windows version of Ruby, for instance) but it would be very difficult to migrate my Cygwin based scripts with the tools available on Msys.
–
JerphJan 3 '10 at 16:26

You are looking to integrate ssh-agent and pageant so that you have only one keystore. One way you can do this is use PuTTY as your terminal, keep your keys in pageant, enable agent forwarding, run Cygwin sshd and ssh to localhost. This will give you an environment where keys are served by pageant over the ssh connection with PuTTY -- no need to run ssh-agent.

It should be possible to do the same with Plink. Just use the -A option, and use the resulting SSH_AUTH_SOCK setting in your interactive Cygwin sessions. Disclaimer: I have not tried this.

Edit: I have now tried this; it works just fine. I created a shortcut to PLINK:

What would be really great is to have an openssh-compatible agent which communicates directly to the pageant keystore, but this won't happen unless someone writes such a beast. I looked into it many moons ago, and it seemed more trouble than it was worth given that this work-around is easy enough.

mmm, this not a bad idea at all. It's probably how I'll go. Thanks! And regarding your openssh-compatible agent, yes that's exactly what I was hoping plink could provide. It seems like it would be a pretty high value piece of code, since so much work goes into making software (like git) compatible with both openssh and plink. Why not just have a translation layer? Seems like "the Unix way" to do it. :)
–
JerphJan 3 '10 at 16:32

I came across charade a while ago, which replaces ssh-agent and proxies to Pageant. At the time I couldn't quite get it working, and haven't had the chance to play with it since, but it might be worth a try. If you have any luck please post back and let me know, it's been on my list of things to do for ages!

I would only add that before you build the package make sure that you have following packages in addition to default cygwin installation: make, gcc-core, keychain, psmisc, and of course openssh. This way if you follow very detailed instruction from the README file you will not get any errors
–
Alexander PogrebnyakSep 14 '10 at 15:49

I also wrote a proxy between openssh and pageant, which I call ssh-pageant. It looks like pretty much the same approach as charade, but I hadn't heard of it. Well in case you have trouble, I thought I'd throw out ssh-pageant to try instead.