Skip to content

Instantly share code, notes, and snippets.

@erichnascimento
Created August 19, 2016 17:10
Show Gist options
  • Save erichnascimento/86c468d62c5e31a186ddafa3bb1060ea to your computer and use it in GitHub Desktop.
Save erichnascimento/86c468d62c5e31a186ddafa3bb1060ea to your computer and use it in GitHub Desktop.
Bind Vagrant port to host port
# List the Vagrant config to get ip address and key path
$ vagrant ssh-config
# Bind port
$ sudo ssh -L 0.0.0.0:80:<vagran-ip>:80 -i <path-to-listed-private-key> -p 2222 -N vagrant@localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment