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

Please add support for SSH tunneling. #11

Open
mxxcon opened this issue Apr 6, 2017 · 7 comments
Open

Please add support for SSH tunneling. #11

mxxcon opened this issue Apr 6, 2017 · 7 comments

Comments

@mxxcon
Copy link

mxxcon commented Apr 6, 2017

Please add support for ssh tunneling in situations where database is not accessible directly from the internet.

@Paxa
Copy link
Owner

Paxa commented Apr 6, 2017

I think it's gonna be useful, will add it.

For now you may open ssh tunnel manually and connect to local port of a tunnel

@smoothdvd
Copy link

working on it

@tobymao
Copy link

tobymao commented Jul 12, 2020

for anyone who's gotten this to work, could you provide how you did it?

i've tried various solutions like ssh and sshuttle without success

my server only allows localhost connection and have connected to it in the past with apps like postico which do support ssh tunneling

@Paxa
Copy link
Owner

Paxa commented Jul 12, 2020

I've got somehow working code on local, but not proper yet, I will try push something soon

@Paxa
Copy link
Owner

Paxa commented Jul 12, 2020

To make ssh tunnel you may run locally

ssh [email protected] -L 15432:127.0.0.1:5432 -N
                          ^ local port     ^ remote port

and connect to your localhost on port 15432, but it won't work with unix socket connection

@tobymao
Copy link

tobymao commented Jul 12, 2020

thank you, i independently also just figured it out and got it working using a command similar to yours

@zrbecker
Copy link

zrbecker commented Feb 5, 2021

For anyone doing this with a AWS bastion to an RDS instance you want to do

ssh -N -L 15432:endpoint.rds.amazonaws.com:5432 username@public-ip-ec2-bastion

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

5 participants