第一步:查明登陆端口和登陆人
[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)
第二步:通知登陆用户将要关闭他
[root@localhost liulangyu]# echo "I will close your connection" > /dev/pts/2
第三步:关闭用户连接
[root@localhost liulangyu]# fuser -k /dev/pts/2
第四步:验证是否已经关闭
[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)
关闭SSH 连接用户
最新推荐文章于 2024-05-27 16:06:59 发布