Re: pgAdmin with SSHTunneling support - Mailing list pgadmin-hackers

From Akshay Joshi
Subject Re: pgAdmin with SSHTunneling support
Date
Msg-id CANxoLDfSC5NLgeFn0fcsxGUDfcgboRqJZwfEH2m09xN8pFrddQ@mail.gmail.com
Whole thread Raw
In response to Re: pgAdmin with SSHTunneling support  (Dave Page <dpage@pgadmin.org>)
Responses Re: pgAdmin with SSHTunneling support  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
Hi

On Wed, Oct 17, 2012 at 7:42 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi


On Wed, Oct 17, 2012 at 1:44 PM, Akshay Joshi
<akshay.joshi@enterprisedb.com> wrote:
> Hi Dave
>
> I have implemented SSH Tunneling and integrate it with pgAdmin3. I have
> tested it on Windows, Linux and MAC. Attached is the patch file.
> Please review it and if it looks OK then can you please commit it.

Cool :-)

I found a couple of things on my initial tests on Mac:

- On my first attempt to connect to a server, I opened the properties
dialogue, and enabled SSH Tunneling, specifying the username and host
etc. When I then tried to connect to the server it prompted for the
SSH password, but didn't prompt for a password for the database, so
the connection failed. The second time I tried, it first prompted for
the database password, then then SSH password which worked fine. When
I restarted pgAdmin, it again failed to prompt for the database
password on the first, but not second attempts.

   Here the problem is we don't have an entry in the "pgpass" file for the localip:port pair(one end of the SSH tunnel). At the first attempt to connect
   to server it looks for the pgpass entry If stored password is checked, in this case user will find the error message. In the second attempt it first
   prompted for the database password which will be store in the variable and in this case user will not bet any error and then for the subsequent
   attempts it uses the password which is stored in the variable. If we restart pgAdmin, again the same problem will occur. 
    

- If I attempt to connect via SSH Tunnel, but cancel when I'm prompted
for a password, the connection attempt proceeds anyway, then fails
first with a valid error message about password auth failing, then
with an "empty" error message about connecting to the (database?)
server.

- When attempting to connect with an identity file, I first get
prompted for a password anyway, then if I just hit return on that
dialogue, I get a message telling me that identity file auth failed
(followed by the same "empty" error message).

   Fixed in the updated patch. Attached is the updated patch. 

Thanks.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Akshay Joshi
Senior Software Engineer 
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Phone: +91 20-3058-9522
Mobile: +91 976-788-8246

Attachment

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: pgAdmin III commit: Ensure FTS object names are quoted if necessary whe
Next
From: Tomas Barton
Date:
Subject: Re: Czech UI translation