Solution to the remote connection failure of the guest SS

Source: Internet
Author: User


1. Modify the PostgreSQL. conf file.

Add listen_addresses = '*'

The default value is localhost. '*' indicates monitoring all hosts (any)

2. Modify the pg_cmd.conf file.

In host all 127.0.0.1/32 MD5

Add the following lines under the row
Host All all 192.168.101.0/24 Trust

Configure 192.168.101.3/32, that is, the CIDR address can obtain different connection restrictions.
192.168.101.3/32 or 192.168.101.3 255.255.255.255, which can only be accessed by hosts with 192.168.101.3;
192.168.101.0/24 or 192.168.101.3 255.255.255.0, which allows access from hosts with IP address 192.168.101.xx;
192.168.0.0/16 or 192.168.101.3 255.255.0.0 allows access from hosts with IP address 192.168.xx.xx;
192.0.0.0/8 or 192.0.0.0 255.0.0.0 allow access from hosts with an IP address of 192. xx.
Address Description: 32, 24, 16, and 8 represent network addresses;
255 represents the subnet mask

* Do not forget to restart the postgresql service after modification.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.