Linux / UNIX kill unresponsive hung SSH session

To kill an unresponsive or hung SSH session in Linux or UNIX, you can use the following command:

$ kill -9 <PID>

Replace <PID> with the process ID of the SSH session. You can find the PID by using the following command:

$ ps -ef | grep ssh

This will list all the running SSH sessions and their corresponding PIDs. Once you have the PID, you can use the kill command to terminate the session.

Note: Use the kill command with caution as it can force close an application and cause data loss or corruption.

(beyondbeaute.com)

Leave a Comment