alajmo/sake

Multiple bastions

hyperglue opened this issue · 2 comments

Hi,
it just so happened that one of my server is only accessible through two bastions, so I think it'd be great to implement a solution for this in sake.

I've search for a phrase "bastion" in the repository and found this:
https://github.com/alajmo/sake/blob/main/core/run/unix.go#L31
If I'm not missing something then it seems like an pretty easy straightforward thing to do: put all bastions as a list in YAML file then echo each item of the list in this format: -J user@bastionA:port, user@bastionB:port.

What do you think about it?

It makes sense to allow multiple jump host.

As you say, allow a list of items instead of a single object. There's a a couple of places where we have to account for it though and I'll look into it.

Release 0.15.0 supports multiple bastions via the bastions property, it expects a list of strings, similar to how hosts work.