I need to make a tunnel from Linux to my Windows 7 machine. I have been able to get it to work with Cygwin, but it's not possible to remove the tunnel later.
To create the tunnel, I type:
ssh -f -N -L 5001:localhost:3306 target
The tunnel goes up with no issues. However, there doesn't seem to be a way to kill it. TCPView shows the process as <non-existent>
, but does give a ProcessID. The ProcessID has already terminated and if I right-click and select "Close Connection". Nothing happens.
Short of a reboot or network enable/disable, what can I do to get rid of this tunnel?