How to kill all ssh processes

Oh you murderer, but let me assist:

[code lang=”bash”]kill -9 ps -eo pid,args | grep "ssh " | grep -v "grep" | cut -c1-6[/code]

This kills all ssh processes. I use this often to kill all my ssh tunnels. It works in Mac OS X Lion as well as Ubuntu/Debian Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *