Created
September 24, 2014 20:16
-
-
Save camsaul/b42b3cfbf823e9429c28 to your computer and use it in GitHub Desktop.
Make a SSH Tunnel to a Postgres DB hosted in Vagrant VM
This file contains 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
#! /bin/bash | |
ssh -L 5555:localhost:5432 vagrant@localhost -p 2222 -i ~/.vagrant.d/insecure_private_key -fNg # local port 5555 <-> Vagrant port 5432 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The location of the key has changed, so the command line is now:
ssh -L 5555:localhost:5432 vagrant@localhost -p 22 -i .vagrant/machines/default/virtualbox/private_key -fNg