Skip to Content
0
Jul 06, 2020 at 06:05 PM

Cannot connect to my postgres DB instance in Cf from my local machine

169 Views

Hello colleagues,

We have a postgres db in our Cf space, and here are my steps to connect to it from my machine:

1. ssh connection to the app that is binded to the db instance:

cf ssh -L 60103:adress:60103 my_app

And I get the ssh connection working.

2. Connect to the postgres db instance:

psql -h localhost -p 60103 -U my_db_user -d my_db_name -W

when I enter the password I get:

connect to 10.11.241.136:60103 failed: ssh: rejected: connect failed (dial tcp address: connect: connection refused)