reynir / ocaml-ssh-agent

BSD 2-Clause "Simplified" License
15 stars 2 forks source link

Support concurrent connections #20

Closed ben-grande closed 1 year ago

ben-grande commented 1 year ago

First, it is so cool this was made.

I haven't tested the OCaml ssh-agent yet. I am opening this issue to demonstrate interest in concurrent connections and to be an actionable item.

I plan to use it together with qubes-mirage-ssh-agent. I have multiple SSH clients that use the same agent because of shared keys. Sometimes a different agent. When using the same agent, I will need concurrency.

From the readme:

It does not support concurrent connections and is not suitable for Production Use™.

reynir commented 1 year ago

Thank you for your kind words and interest!

This is mainly a library for serializing and deserializing ssh-agent messages. In other words this library doesn't implement much ssh-agent logic - it doesn't prevent concurrency. As small examples I implemented two binaries ssh_add and ssh_agent_server; neither supports concurrency, but they are just "simple" examples.

In qubes-mirage-ssh-agent I believe it is concurrent (using cooperative concurrency; long computational jobs (e.g. cryptographic jobs) will block though (I imagine that's the case for the openssh implementation as well) .

Please feel free to open an issue either here or on qubes-mirage-ssh-agent if you have any more questions or face issues. I unfortunately don't have a Qubes setup anymore, but I would love to help out as much as I can.