Assuming I logged in with OpenSSH on port 22 and then also tunneled the ports 3306 and 80.
Port 80 was the last to be tunneled from all three (22, 3306, 80):
$ sudo ssh UWU@IP -L 80:localhost:80
How can I kill only the port 80 tunneling process?
I believe the best way would be to automatically target the port 80 tunnel somehow. An alternative is to target the last one of the 3 tunnels.
Why I ask this:
I can do
ps aux | grep ssh, find the process, and then kill it specifically, but it's not automatic.