![]() The port of the remote server (this is always 5432).The name of the remote server (for example, ).There are several PostgreSQL client applications available, but for all of them, you must provide the following information to establish a remote connection: To set up a direct connection between your local site and the PostgreSQL server, you must configure a client application. Psql -U username -h localhost -p 5432 dbname Replace username with the database user, and dbname with the name of the database: When the remote server's command line prompt appears, the SSH tunnel is established and you can use your PostgreSQL client applications on the local computer.įor example, if the psql client application is installed on your local computer, you can type the following command to access a database on the A2 Hosting server. Type your password, and then press Enter. If you are running a PostgreSQL server on your local computer, you might have to change the first 5432 to another port number (for example, to 5433) to avoid port conflicts. The number after localhost is the port number at the remote (server) end of the tunnel. Provide authentication information for the selected server: Use the Password field to provide the password of the user that is associated with the defined server. The number before localhost is the port number at the local end of the tunnel. When using SSH Tunneling, the Connect to Server dialog will prompt for the SSH Tunnel and Database server passwords if not already saved. In the Source port text box of the Port Forwarding section, type 5432. ![]() In the Category pane, expand Connection, expand SSH, and then click Tunnels.To set up an SSH tunnel on a computer running Microsoft Windows: After you have downloaded the PuTTY executable to your local computer, you can set up an SSH tunnel. A2 Hosting recommends using PuTTY, which you can download here. In order to use an SSH tunnel on a computer running Microsoft Windows, you need an SSH client program. ![]() The procedure you follow to set up an SSH tunnel between your local computer and the A2 Hosting server depends on the local computer's operating system. Direct connection: You can set up a direct connection between your local computer and the remote PostgreSQL server on port 5432.Īfter you have set up a remote PostgreSQL connection, you can use a client application such as psql to work with your databases.The PostgreSQL traffic is encrypted by the SSH tunnel. You set up an SSH tunnel that forwards a port on your local computer to the remote PostgreSQL server. ![]()
0 Comments
Leave a Reply. |