Re: hostnossl in pg_hba.conf demands a password - Mailing list pgsql-admin

From John Scalia
Subject Re: hostnossl in pg_hba.conf demands a password
Date
Msg-id FADA7A56-4601-4513-8321-551A148EA717@gmail.com
Whole thread Raw
In response to Re: hostnossl in pg_hba.conf demands a password  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Thanks, Tom,

I'll check to see if it's trying an SSL comnection, but being that I logged into this server, and I know that I don't
havean .ssh subdirectory in my home dir, I didn't think an SSL connection would be tried. We'll see. 

Thanks again,
Jay





Sent from my iPad

> On Nov 14, 2016, at 4:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> John Scalia <jayknowsunix@gmail.com> writes:
>> The only entries are a local connection line with md5 authentication specified and a line for local replication with
atrust authentication. Both of these entries do seem to be working properly. 
>
> So the client is trying an SSL connection first (which would be the
> default behavior for libpq at least), and that falls through the
> hostnossl line and is captured by the md5 line.  Hence you get a
> password prompt.  The client has no way to know that a non-SSL
> connection would have gotten a different response.
>
> You could change the md5 line to hostssl, perhaps.  Or configure
> the client to try non-SSL first (see sslprefer).
>
>            regards, tom lane


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: hostnossl in pg_hba.conf demands a password
Next
From: Poul Kristensen
Date:
Subject: Re: Postgresql 9.5 committing and log sequence number