How To Kill A Remote TTY Session In Centos Linux:

First do a ‘w’ command to get the ‘tty’ details of the session that you would like to terminate.

# w
root     pts/1    10:21    0.00s  0.03s  0.00s w
root pts/2   10.0.0.XX 16:26 0.00s 0.02s 0.00s w

In the above example, i have initiated another ssh session from 10.0.0.XX. To kill this session,
Find the PID of the process with

# ps -ft pts/2

# kill -9 11236

This will terminate the remote session.

WP Twitter Auto Publish Powered By :