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

share|improve this question
    
What's your ssh tunnel configuration ? – Clément Prévost Apr 24 '16 at 14:36
    
As described I use the ssh tab in pgadmin server configuration. I'm using the IP of the remote host and a key file. If I using this in pycharm everything works fine. – Lioman Apr 25 '16 at 5:35

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.

share|improve this answer
    
After hours and hours and banging my head, I could make it work thanks to your suggestion. pgAdmin 1.22.1 has issues with ssh tunnel. I could make it work by using pgAdmin 1.20.0 and PG 9.4. – jasonco Feb 23 '17 at 3:26

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.

share|improve this answer
    
How does this work with the docker container IP on the remote host? Is that docker IP what you mean by pg-host here? – Kev Apr 8 '17 at 7:14
1  
@Kev if you replace <pg-host> with the docker ip and the jump-host with the remote host, that should work fine – Mikey Apr 9 '17 at 14:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.