Home » Questions » Computers [ Ask a new question ]

How do I remove an SSH forwarded port

How do I remove an SSH forwarded port

I used ssh -L 10002:192.168.0.30:10002 192.168.1.135 to establish port forwarding but now I need to remove it.

Asked by: Guest | Views: 76
Total answers/comments: 2
Guest [Entry]

"If you are using Linux you can kill the process by:

ps aux | grep ssh

and then use

kill <id>

To kill the process.

If the kill command is not successfull you can try

kill -9 <id>"
Guest [Entry]

"How to cancel a forwarded port in an already running SSH session:

Press ~+C (tilde + capital C)
Type -KL port
Press Enter

You should see this:

ssh> -KL 10002
Canceled forwarding."