Guidance on usage: PostgreSQL Server 14 on Ubuntu Server 24.04 Minimal

Facilitate your data management with PostgreSQL Server 14 on Ubuntu 24.04 Minimal

Effortless installation. Ready-to-run with easy maintenance. Explore now for a smooth experience!

Connecting and configuring PostgreSQL Server 14 on Ubuntu Server 24.04 LTS Minimal using pgAdmin 4 through SSH Tunnel

  1. Before you begin, go to the pgAdmin download page – Download, select the desired version, download, and install it
  1. To connect to the server, you need to know the IP address of the VM. You can find it in the personal account of Azure. Select the virtual machine from the list and click on “Overview.” Your IP address will be displayed under “Public IP Address.
  1. To get credentials for the Postgre server, you should connect to a VM.
  • With OpenSSH

In the Windows 10 operating system (starting with version 1809), an OpenSSH client is available, with which you can connect to Linux servers via SSH. If Windows 10 is suitable and the OpenSSH client is installed, you can start connecting via SSH. To do this, launch a standard Windows command prompt and enter the command “ssh user@*vm_ip*” (1), where “user” is the username that was specified while creating the virtual machine and “*vm_ip*” is the VM IP address.

Then type “Yes” (2) and enter a password (3) that was specified while creating the virtual machine.

  • With the PuTTy application 

To do this you need the PuTTy application to connect via ssh. You can download it at the following link – Download

Run Putty, enter the VM address in the “Host” field (1) and click “Open” (2) to connect.

In the opened console, you will need to enter the username (1) and password (2) that were specified while the VM was being created (you’ll not see the password in the console while entering it). 

  1. To view the credentials, use the command 

sudo cat /root/postgres_credentials:

  1. To check the server version enter

$ psql -V

  1. Run pgAdmin. By default, you will be asked to set a master password

Set the password and click “OK”.

  1. Click “Add New Server” on the main page
  1. In the pop-up window, enter the name of your connection in the “Name” field.
  1. Go to the “Connection” tab and enter the credentials from step 4
  1. Go to the “SSH Tunnel” tab and click the “Use SSH tunneling” switch (1), in the “Tunnel host” field enter the address of the virtual machine (2), in the “Username” field type the username to connect to VM (3), in the “Password” field enter the password (4), which you have used at connecting to the virtual machine. Click “Save” (5) to confirm the changes and establish the connection
  1. Your connection is ready

For more information, refer to the Preface – PostgreSQL: Documentation