what-digital / divio

A project for tracking divio.com deployment issues
0 stars 0 forks source link

SSH tunneling to access stage database from localhost doesn't appear to be working (Use case: debugging and fixing live dbs) #40

Closed viktor-yunenko closed 3 years ago

viktor-yunenko commented 3 years ago

Eg psql command doesn't work.

macolo commented 3 years ago

This is by design, due to security concerns it's not possible to directly connect to the database from outside.

Please also see https://docs.divio.com/en/latest/how-to/interact-database/#interact-with-the-cloud-database

macolo commented 3 years ago

Also, SSH tunneling via the SSH instructions should work, like this: https://support.divio.com/en/articles/735276-how-to-ssh-into-your-cloud-server

macolo commented 3 years ago

hi @victor-yunenko if you are happy with my answers please feel free to close otherwise please specify

viktor-yunenko commented 3 years ago

Also, SSH tunneling via the SSH instructions should work, like this: https://support.divio.com/en/articles/735276-how-to-ssh-into-your-cloud-server

Did the ssh tunnel work for you? I was receiving an error when I tried last time

viktor-yunenko commented 3 years ago

A whitelist is a good practice, but I would say the problem here is the inability to configure or workaround it. Ie it isn't possible to simulate a server instance anymore then.

macolo commented 3 years ago

@victor-yunenko it would be great if you could share the CLI command you used to set up the SSH tunnel here (without the project's credentials), thank you!

macolo commented 3 years ago

Note:

Use cases:

macolo commented 3 years ago

Alternative to use case: use fixtures

viktor-yunenko commented 3 years ago

I tried ssh tunneling lately, that seems to work fine. I would say it deserves documentation since on other platforms a user usually gets the ability to configure the whitelisting.

viktor-yunenko commented 3 years ago

We aren't affected by it at the moment, hence we'll close it for now.