-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow SSH tunnelling to other VPC resources #712
Comments
I believe the use-case is already supported. Follow the instructions in the "SSH ProxyCommand support" section in README But instead of issuing the command:
Then instead issue:
Now your localhost port 5000 is tunneling through your EC2 instance all the way to |
@mbp , thanks for explaining that. I'll be honest, I didn't understand the SSH ProxyCommand documentation when I first read it. I've understood it now and made it work, but there are some things I found confusing. I don't like how the SSH host name is used as a proprietary way of specifying the region and profile for the AWS commands. I prefer to use the standard Since creating this issue I've submitted a PR that adds the option Would you consider this way of supporting the use case? |
I'm not the maintainer, I think we have to wait for @xen0l :-) |
Hello folks, thanks for the issue. I am generally opposed in extending I will also revamp the documentation on this explaining when to use |
It exists because not all applications support connecting to AWS resource via native API and this naming add convevience method (maybe opinionated) if you are using multiple regions with multiple AWS accounts for those cases as it allows to use ssh(1) transparently with |
@xen0l , thanks for your response.
I understand the desire to avoid duplication. Maybe we could consider the
Whatever the solution, I think concrete examples in the documentation would help a lot to make it clearer what aws-gate can do. I attempted to do this in my PR. Even if you don't merge it as is, maybe you can take the same use cases and show how to support them.
I haven't used the |
PR merged @iainelder, thanks for contrribution. I went on and added -R/-D support. -D is defintiely useful, -R for some specific cases as well. I will continue with #719. Once finished, would you be able to proofread it and provide feedback it's clearer? |
My use case: I have a MySQL RDS instance and an EC2 Amazon Linux 2 instance in a private subnet in a VPC. The EC2 instance can connect to the RDS instance. I want to connect to the RDS instance from my desktop so I can query it using familiar GUI tools such as DBeaver.
The EC2 instance is enabled for EC2 instance connect and Session Manager, so I can use
aws-gate ssh
to connect to it automatically. However, this only gets me halfway.I would like to create an SSH tunnel through the EC2 instance from a port on my desktop to the RDS instance. I don't see a way to set that up with aws-gate.
Charlie Belmer published a script that allows me to do what I need. As far as I can tell, it uses the same AWS APIs as aws-gate does to solve the problem, and extends the solution by using ssh's -L option to create a tunnel over which database tools can connect. I've pasted the code from the article below.
Would it be possible to add the
-L
option toaws-gate ssh
?The text was updated successfully, but these errors were encountered: