Close SSH connection user

Step 1: Find out the login port and login person
[root@localhost liulangyu]# who
liulangyu :0 2015-07-22 03:03 (:0)
root pts/0 2015-07-23 00:27 (192.168.176.1 )
liulangyu pts/1 2015-07-23 00:29 (:0)
root pts/2 2015-07-23 01:44 (192.168.176.1)
Step 2: Notify the logged in user that he will be closed
[root@localhost liulangyu] # echo "I will close your connection" > /dev/pts/2
Step 3: Close the user connection
[root@localhost liulangyu]# fuser -k /dev/pts/2
Step 4: Verify that
[root@ localhost liulangyu]# who
liulangyu :0 2015-07-22 03:03 (:0)
root pts/0 2015-07-23 00:27 (192.168.176.1)
liulangyu pts/1 2015-07-23 00:29 ( :0)

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327083695&siteId=291194637