Skip to content

Instantly share code, notes, and snippets.

@iguoli
Last active July 17, 2018 14:22
Show Gist options
  • Save iguoli/72ed157ae9fc3bb1594ac8596e67dad1 to your computer and use it in GitHub Desktop.
Save iguoli/72ed157ae9fc3bb1594ac8596e67dad1 to your computer and use it in GitHub Desktop.
Vagrant虚拟机访问主机端口
$ vagrant ssh -- -R 1080:localhost:1080

This follows the ssh option syntax -R [bind_address:]port:host:hostport, where the first number is the port number to listen on inside the guest machine, and the last two are the service address as visible from the host machine

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