'Why does pgadmin use the wrong port?

I am trying to connect to a database that runs in a docker container on a VM.

I setup the SSH tunnel and I don't get an error, so I guess that works.

But I get this error message. Which looks a bit weird, because it is about port 62917 instead port 5432.

Why is pgadmin using a seemingly random port here?

using pgadmin 4 6.8

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source