paint-brush
How to Connect Your Bastion Server to a PostgreSQL Server with an SSH Tunnelby@theBenForce
9,225 reads
9,225 reads

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

by Ben Force2mMarch 30th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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
Ben Force

Ben Force

@theBenForce

5x AWS Certified Senior Software Engineer. I write about architecture, infrastructure as code, and automation.

Learn More
LEARN MORE ABOUT @THEBENFORCE'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Ben Force HackerNoon profile picture
Ben Force@theBenForce
5x AWS Certified Senior Software Engineer. I write about architecture, infrastructure as code, and automation.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite