Knowledgebase & Downloads

The knowledgebase provides documentation written by our team. Please select a category or search for answers.


Accessing PostgreSQL via SSH Putty tunnel

PostgreSQL is second most used SQL server in our Java hosting.
jaIn your welcome email titled 'New Hosting Account Created' you can find procedure for setting up key based SSH login.
You cannot connect directly with PostgreSQL server but you can use SSH tunnel for this.
If you want to add tunelling please perform the below steps:

1) Load SSH session to JVMHost server e.g. the one called 'jvmhost' when setting up Putty connection for the first time.
2) Click Connection > SSH > Tunnels
3) Click the Local radio box and type in the Source Port - this is the server's PostgreSQL port which is generally 5432 
(this port will be used on your local PC so make sure it does not conflict with local PostgreSQL server and change it if necessary).
On Windows you can check if the port PostgreSQl server is taken either by your local server or by the running tunnel with: netstat -an | find "5432"
4) In Destination - this is the server address and port you want the traffic redirected to on server - put localhost:5432 and click Add.
5) Click Session in the top of left menu, enter session name e.g. 'jvmhost' and save
6) Double click the session name. You should be logged in and th tunnel ready for use.
In PgAdmin in the 'New Server Registration' window (or in any other PostgreSQL client) you specify localhost in the Hostname field.

Powered by HostBill