8

ssh-agent has a protocol whereby data can be sent to it to get signed by a particular private key:

http://api.libssh.org/rfc/PROTOCOL.agent

In Linux, with ssh-agent, you'd open a Unix domain socket to SSH_AUTH_SOCK and send the packets to that. Windows, however, doesn't have a Unix domain socket.

Any ideas?

Thanks!

neubert
  • 15,947
  • 24
  • 120
  • 212

2 Answers2

9

The communication between putty and pageant has been done on the shared memory by using WIN32 APIs. I had implemented that protocol in Java with JNA. If you are interested in its protocol and want to learn how it runs on Windows, the following file may be useful,

https://github.com/ymnk/jsch-agent-proxy/blob/master/jsch-agent-proxy-pageant/src/main/java/com/jcraft/jsch/agentproxy/connector/PageantConnector.java

Kristopher Johnson
  • 81,409
  • 55
  • 245
  • 302
ymnk
  • 1,145
  • 7
  • 7
4

If you're implementing the protocol in C, you might reference the canonical PuTTY implementation. If you're implementing it in Python, the paramiko project implements the Putty Pageant protocol.

Best I understand, the protocol is the same, but the transport is different, using shared memory rather than sockets.

Jason R. Coombs
  • 41,115
  • 10
  • 83
  • 93