Connection caching?

Damien Miller djm at mindrot.org
Sun May 2 19:13:46 EST 2004


Dan Kegel wrote:
> Hey all,
> on the distcc mailing list, a thread about load balancing
> got a bit out of hand, and we started thinking about
> moving fsh-like connection caching into ssh itself
> to get rid of the overhead of starting up the python
> interpreter to run rsh.
> (Interestingly, mit's "rex", described at
> http://www.lcs.mit.edu/publications/pubs/pdf/MIT-LCS-TR-884.pdf,
> considers connection caching one of the advantages it has over ssh.)

The SSH protocol already includes the necessary capabilities to
implement this, and I have been wanting to do this for a little
while (but have obviously not gotten around to it).

One you have established a SSH transport, you can fire off lots of
sessions (command, shell or subsystem) which have independant
lifespans. Our client only supports a single such session, but
Our sshd already has this capability and I believe that the
ssh.com windows client supports multiple connections against
OpenSSH sshd.

To implement this in OpenSSH's ssh, I was thinking about adding
an argument to get ssh to listen on a unix domain socket after
authentication.

Additional sessions could be established by connecting to this
socket, using SCM_RIGHTS messages to pass the std{in,out,err} fds
to the connected ssh. It would probably be easiest to modify ssh
to be the client, as it already does most of the buffering, etc.

This wouldn't add much complexity to ssh, just a little bit of
logic to deal with the control socket - we already have most
of the infrastructure in the event loop to deal with multiple
connections.

This would be a good medium-sized project for someone to sink
their teeth into :)

-d




More information about the openssh-unix-dev mailing list