Re: Problem with connection to host (wrong host)

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Mike Martin <redtux1(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Problem with connection to host (wrong host)
Date: 2018-03-31 16:00:37
Message-ID: CANu8Fiymdo284dK5sSHg+SkyioPwkJ8_nsft+OqakkdOrYodng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Mar 31, 2018 at 11:44 AM, Mike Martin <redtux1(at)gmail(dot)com> wrote:

> Hi
> I am just setting up a postgres server, details
> Host 192.168.0.3
> pg_hba.conf
> # TYPE DATABASE USER ADDRESS METHOD
>
> # "local" is for Unix domain socket connections only
> local all all peer
> # IPv4 local connections:
> host all all 192.168.0.0/32 ident
> # IPv6 local connections:
> host all all 127.0.0.1/32 ident
>
> host all all ::1/128 ident
>
> postgresql.conf
> listen_addresses-'*'
>
> however when I try to connect from my laptop (ip 192.168.0.2) I get
>
> psql -h 192.168.0.3 -U usevideo -W
> Password for user usevideo:
> psql: FATAL: no pg_hba.conf entry for host "192.168.0.2", user
> "usevideo", database "usevideo", SSL off
>
> So a bit confused, is psql ignoring the host parameter
>
> thanks
>
>
>

*>So a bit confused, is psql ignoring the host parameter It is not ignoring
your entry, you simply have not entry for the laptop you are connecting
from,So simply add the following:*
*host all all 192.168.0.2/32
ident * <- note, you may have to change the authentication
method depending on your environment

--
*Melvin Davidson*
*Maj. Database & Exploration Specialist*
*Universe Exploration Command – UXC*
Employment by invitation only!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Radoslav Nedyalkov 2018-03-31 18:49:32 is pg_advisory_lock() suitable for long runs
Previous Message Peter Eisentraut 2018-03-31 15:59:12 Re: Problem with connection to host (wrong host)