Last active
February 18, 2022 03:47
-
-
Save encoreshao/549a37789d55aa2d7707a96139c0decb to your computer and use it in GitHub Desktop.
Port forward from external PostgreSQL to localhost in backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ vim ~/scripts/startup/simplevpn.sh | |
#!/bin/bash | |
/usr/bin/ssh -vfNT -p 8020 -o Compression=yes -o DynamicForward=9090 -o ServerAliveInterval=1 -L 5444:127.0.0.1:5432 [email protected] &>/dev/null & | |
❯ ~/scripts/startup/simplevpn.sh | |
❯ psql -U pg_user -d db_name -h localhost -p 5444 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment