![postgres ssh tunnel postgres ssh tunnel](https://i.stack.imgur.com/xokgn.png)
In this tunnel, all the data traveling between your computer and the remote server will be encrypted by the SSH protocol. On the remote server, the PostgreSQL server will receive a connection request coming from a “localhost” address. After launching the tunnel on your computer, pgAdmin will try to connect to a PostgreSQL server on the “localhost” using a port number you specified while setting up the SSH tunnel.
![postgres ssh tunnel postgres ssh tunnel](https://www.tcien.com/wp-content/uploads/2020/04/pgadmin_screen4-300x234.png)
By launching a SSH tunnel between your computer and the Linux server, you are binding the two computers into one “localhost” with one specific port number on each side. It does not accept any connection requests except the ones coming from the “localhost” address. By default, a PostgreSQL database server only listens to local connection requests.
Postgres ssh tunnel how to#
We also recommend reading this page, which may help you better understand the mechanism of SSH tunneling, and how to use SSH tunnels for PostgreSQL in the command line.
![postgres ssh tunnel postgres ssh tunnel](https://mhelp.pro/ru/wp-content/uploads/sites/2/2020/10/connecting-to-postgresql-via-ssh-tunnel-768x384.png)
In this article, we will discuss how to use pgAdmin to access the databases with SSH tunnels because it is the most common choice for beginners to begin working with databases. Among the ways of securing communication between the labs' servers and users' computers is SSH tunneling, which we believe is the most technically elegant way. The data sets that are provided to the Stevens community by the Hanlon Financial Systems Laboratories are often quite valuable and, in some cases, security-sensitive.