azuresonarqube

Connect to SonarQube™ from a different machine

For security reasons, the PostgreSQL port in this solution cannot be accessed over a public IP address. To connect to PostgreSQL from a different machine, you must open port for remote access. Refer to the FAQ for more information on this.

IMPORTANT: By default, the database port for the nodes in this solution cannot be accessed over a public IP address. As a result, you will only be able to connect to your database nodes from machines that are running in the same network. For security reasons, we do not recommend making the database port accessible over a public IP address. If you must make it accessible over a public IP address, we recommend restricting access to a trusted list of source IP addresses using firewall rules. For development purposes, you can also use a VPN or SSH tunnel. Refer to the FAQ for information on accessing restricted ports using an SSH tunnel or opening ports in the server firewall.

Once you have an active SSH tunnel or you opened the port for remote access, you can then connect to PostgreSQL using a command like the one below.

Remember to replace SOURCE-PORT with the source port number specified in the SSH tunnel configuration or if you opened the port for remote access.

$ psql -h 127.0.0.1 -U postgres -p SOURCE-PORT

You will be prompted to enter the postgres user password. This is the same as the application password.

Last modification April 8, 2020