Skip to content

Instantly share code, notes, and snippets.

@theraccoonbear
Forked from camsaul/make_db_ssh_tunnel.sh
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theraccoonbear/c4408f655ba4491d7bf1 to your computer and use it in GitHub Desktop.
Save theraccoonbear/c4408f655ba4491d7bf1 to your computer and use it in GitHub Desktop.
Make a SSH Tunnel to a Postgres DB hosted in Vagrant VM
#! /bin/bash
ssh -L 5555:localhost:5432 vagrant@localhost -p 2222 -i ~/.vagrant.d/insecure_private_key -fNg # local port 5555 <-> Vagrant port 5432
@theraccoonbear
Copy link
Author

Handy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment