Since the container could be used by multiple team members, I had an external scripts to tear down after 30min of inactivity.
Thinking, we can make dialing the provider responsibility. I didn't want to block the goroutine there, but it could just spawn another temporary one for dialing.
Then the manager can be generic over ReadWriter, and optionally try if whatever it has is also Closer.
Beyond that, I think Docker talks gRPC?
P.S.: Note that I made this AGPL. If you planned on creating some sort of product out of this, best start fresh from the golang.org/x/crypto. Might even be simpler in the end, because I feel like a big part of lazyssh is management of resources, which in Docker is (probably) local, cheap and almost instant.
I like this idea! I wonder how much of it is compatible with how LazySSH works right now. It’s not really on my list of things, though.
I've been thinking of the same thing for a while now but I was thinking of utilizing containers instead of virtual machines.
It would be sweet to have a jump box that creates an isolated container for every user that logs in. The container could just be torn down on logoff.