Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple bastion hosts #14523

Open
tomwganem opened this issue May 15, 2017 · 6 comments
Open

Support for multiple bastion hosts #14523

tomwganem opened this issue May 15, 2017 · 6 comments

Comments

@tomwganem
Copy link

My use case is this: our terraform cluster is only accessible through a bastion host, and that bastion host is only accessible from our office network. Currently, if I ever need to do provisioning outside the office, I configure my ~/.ssh/ssh_config to support multiple jumps, and in terraform use the "local-exec" provisioner to do my provisioning using my system's ssh . It would be cleaner though if I could specify multiple bastion hosts.

@apparentlymart
Copy link
Contributor

Hi @tomwganem! Thanks for this feature request.

Over in #8367 we were discussing a generalized feature for tunneling connections through bastion servers. Although in that discussion the use-case we had in mind was non-SSH services like Consul and MySQL, it could presumably also be used to tunnel an SSH connection through an SSH connection, which is not exactly the same as accessing a bastion through a bastion but could perhaps achieve the same result.

@rmanz
Copy link

rmanz commented Dec 15, 2017

Hello,

I've just submitted a PR #16933 which is related to the issue.
@apparentlymart may I ask you to take a short look at it?
I flagged it WIP because I am really not sure if this approach is right; if it turns out to be wrong, pls. tell me and I will delete it again.

Thanks!

@vadixidav
Copy link

Bump. This is important to me as I currently also have to use local-exec due to corporate security which requires me to hit a jump host to the internet before the bastion. It would be ideal if connection automatically could use rules in my ~/.ssh/config.

@clausa20
Copy link

+1 , There was some news about this change? Is it supported in some version. Thanks.

@rafalwrzeszcz
Copy link

+1, this is required to work eg. with RDS instances in private subnets (outside -> bastion -> service node -> servive db)

@RomanManz
Copy link

We could write a small library that parses an ssh-config file for 'ProxyJump' hops and then call this library from within TF to create the ssh session. This would be a more reusable approach and easier to integrate probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants