##SSH踢出连接用户 ###1、查看系统在线用户 [root@testdb ~]# w root pts/0 115.60.2.252 14:30 0.00s 0.07s 0.05s w root pts/1 115.60.2.252 14:30 12.00s 0.01s 0.01s -bash ###2.判断属于此时自己的终端(我开了两个连接) [root@testdb ~]# who am i root pts/0 2013-12-31 14:30 (115.60.2.252) ###3.pkill掉踢出自己不使用的终端 pkill -kill -t pts/1 ###4.查看当前终端情况 [root@testdb ~]# w root pts/0 115.60.2.252 14:30 0.00s 0.04s 0.01s w ps:如果最后查看还是没有被踢出,可以加上-9 强制踢出。 pkill -9 -t pts/1
最后修改:2021 年 10 月 07 日
如果觉得我的文章对你有用,欢迎打赏