Lioman
Lioman

Reputation: 535

Connect to database in docker container on remote host with pgadmin3

I'm trying to connect to a database running in a docker container on a remote host. I configured SSH-Tunnel in pgadmin3 with ip of the host and identity file. On Settings tab I inserted 172.18.0.2 (the container IP) as host. It is not possible to connect. pgadmin turns grey for a while and presents me a beautiful error message:

SSH error: Error when starting up SSH session with error code -8 [Unable to exchange encryption keys]

Do I miss something? Is it possible to connect to the container?

enter image description here

Upvotes: 4

Views: 3851

Answers (2)

Mikey
Mikey

Reputation: 2951

If you require access to a Postgres 9.5 database, you can manually create the SSH tunnel, and then connect using pgAdmin3 by setting the host to localhost. On Linux or Mac, you can use the following: ssh -L 5432:<pg-host>:5432 <jump-host-ip-or-dns>. It doesn't seem likely that pgAdmin3 will receive any updates with the direction pgAdmin4 is heading.

Upvotes: 3

Sinatra
Sinatra

Reputation: 878

When I upgraded pgAdmin 1.20.0 to 1.22.1, I started getting the same error. pgAdmin 4 doesn't have support for any SSH tunnel either. So, the only option you have right now is .. revert back to 1.20.0. Unfortunately, if you're on PG9.5 or better, pgAdmin 1.20.0 doesn't support it.

Upvotes: 3

Related Questions