pgAdmin 4 SSH tunnel appears to be ignoring port setting

From: michael_cgla <michael(at)cg-la(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: pgAdmin 4 SSH tunnel appears to be ignoring port setting
Date: 2018-08-02 16:03:44
Message-ID: 1533225824503-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

I am running a database in a virtual machine. I can successfully SSH into the
virtual machine using this command:

ssh vagrant(at)localhost -p 2222 -i
/Users/michael/Code/gvip/puphpet/files/dot/ssh/id_rsa

…and then I can connect to the database by running:

psql dbname username

However, I am not having any luck getting pgAdmin 4 to connect via SSH
tunnel. Here is what I have entered on the settings screen:

<http://www.postgresql-archive.org/file/t352060/Screen_Shot_2018-08-02_at_11.png>

And here is what I see when I then try to connect:

<http://www.postgresql-archive.org/file/t352060/Screen_Shot_2018-08-02_at_11.png>

I then click OK (without entering anything) and see this error
message("Failed to create the SSH tunnel. Error: Could not establish session
to SSH gateway"):

<http://www.postgresql-archive.org/file/t352060/Screen_Shot_2018-08-02_at_11.png>

Here is what I see in the logs:

2018-08-02 12:01:21,033| ERROR | Could not connect to gateway localhost:22
: 61
2018-08-02 12:01:21,050: ERROR pgadmin: Could not establish session to SSH
gateway
Traceback (most recent call last):
File "/Applications/pgAdmin
4.app/Contents/Resources/web/pgadmin/utils/driver/psycopg2/server_manager.py",
line 415, in create_ssh_tunnel
self.tunnel_object.start()
File "/Applications/pgAdmin
4.app/Contents/Resources/venv/lib/python3.6/site-packages/sshtunnel.py",
line 1295, in start
reason='Could not establish session to SSH gateway')
File "/Applications/pgAdmin
4.app/Contents/Resources/venv/lib/python3.6/site-packages/sshtunnel.py",
line 1101, in _raise
raise exception(reason)
sshtunnel.BaseSSHTunnelForwarderError: Could not establish session to SSH
gateway
2018-08-02 12:01:21,068: ERROR pgadmin: Could not connected to server(#2) -
'GViP on Vagrant (localhost)'.
Error: Failed to create the SSH tunnel.
Error: Could not establish session to SSH gateway

It looks from this log like pgAdmin is trying to connect on port 22,
ignoring my setting of port 2222. Is this possible?

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Akshay Joshi 2018-08-03 01:45:12 Re: pgAdmin 4 SSH tunnel appears to be ignoring port setting
Previous Message Michael Pavey 2018-08-02 15:53:37 subscribe