I\'m trying to get remote debugging to work. The PHP is running on a VM and I\'m trying to debug from NetBeans on the host machine.
I\'ve followed the instructions here
What worked for me was running the following from my host:
ssh -R 9000:localhost:9000 yourUserName@yourVirtualMachine
Note the use of the -R flag instead of -L. I had trouble using port forwarding to get things working, while the ssh tunnel worked perfectly. Note you could also do this by running the ssh command from within the VM and connecting to the host with the -L flag.
Since I ended up on this question while working with Vagrant, this is the command I personally used, use the password 'vagrant' when prompted:
ssh -p 2222 vagrant@127.0.0.1 -R 9000:localhost:9000