By Jon Saints - 13 Aug 2014
Start with a fresh install of Ubuntu 14.04 Trusty. (AWS or vagrant might be a good way.)
On the server run the commands below.
I prefer to create one user per database for security.
Replace DATABASE_NAME_HERE and USER_NAME_HERE with the values that you want to use
Postgresql will ask you for your password. Then you should see:
To exit type:
Now, on your desktop computer install pgAdmin3 and connect securely to the database via an SSH tunnel.
First, open a terminal on your Desktop computer (these instructions are for Mac or Linux)
Open a tunnel using an ssh password or PEM file. You will need to know the username you use to SSH to the server and the server address or ip address.
If you are using a PEM file, then you can add -i option to the SSH command
This will open a secure tunnel between your desktop and the database server. To exit the tunnel, just press Cntrl+C.
Next, open pgAdmin3 and create a new connection using these settings:
When you are done using the database close PgAdmin3 and in the terminal where the tunnel is running press Cntrl+c to exit the tunnel.