4 ms·
Interesting that this creates virtual machines... I've been thinking of the same thing for a while now but I was thinking of utilizing containers instead of vi
by noinsight 6y ago
Interesting that this creates virtual machines...
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.
- kosinus 6y agoThis did cross my mind! Specifically, just forwarding to something other than TCP. Doesn't sound impossible if we change interfaces a little bit. 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.
- kosinus 6y agoI wasn’t thinking this through. LazySSH is a jump host only right now, so the endpoint also needs to be SSH.
- nerpderp82 6y agoIf you run the dns, you could create endpoints based on the name ssh foo@ubuntu20-16G-100G-8c.project-a
- kosinus 6y agoThat’s the beauty of how jumphosts work, you get the input hostname verbatim. SSH leaves lookup to the server. :-) 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.
- momothereal 6y agoI did something like this[1] for a CTF I hosted. It spins up a pod in Kubernetes with a predefined set of images based on the username. e.g. `ssh TeamCode:CHALLENGE_NAME@ssh.coop-ctf.ca` would spin up the container for that team with the image for the challenge. Since the container could be used by multiple team members, I had an external scripts to tear down after 30min of inactivity. [1] https://github.com/coop-ctf/ssh-gateway https://github.com/coop-ctf/ssh-gateway