Install PostgreSQL 13 on a server:
sudo apt install postgresql-13
Create a PostgreSQL role and database for an existing OS user:
sudo -u postgres createuser --pwprompt oliver sudo -u postgres createdb -O oliver oliver
Then make sure you have DBeaver CE installed on a client machine.
Create a connection from DBeaver to Postgres:
Configure authentication to database “oliver” via localhost, as we will use an ssh tunnel, and leave password empty:
Configure ssh tunnel, for example if the server host is named “tc”. In the example we rely on a running ssh agent, which was explained in an earlier blog post.
Then click “Connect” in the context menu of the new connection entry, and enter the password you assigned to the role:
And you should be connected: