How to Connect Your Bastion Server to a PostgreSQL Server with an SSH Tunnelby@theBenForce
5,113 reads

How to Connect Your Bastion Server to a PostgreSQL Server with an SSH Tunnel

tldt arrow
Read on Terminal Reader🖨️
JS🚫

Too Long; Didn't Read

An SSH tunnel is a way to redirect requests to a port on localhost to a remote server. Some DB clients handle this automatically for you, but if you want to interact with the database through the shell you'll need to create it yourself. To create an SSH config with all of the tunnel settings, edit your.config to create the tunnel and add your. SSH key to the bastion server so that you don't have to type in your password every time you connect to the database.

Company Mentioned

Mention Thumbnail
featured image - How to Connect Your Bastion Server to a PostgreSQL Server with an SSH Tunnel
Ben Force HackerNoon profile picture

@theBenForce

Ben Force

Learn More
LEARN MORE ABOUT @THEBENFORCE'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart
Ben Force HackerNoon profile picture
by Ben Force @theBenForce.5x AWS Certified Senior Software Engineer. I write about architecture, infrastructure as code, and automation.
Visit My Blog

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa