这是一个创建于 2083 天前的主题,其中的信息可能已经有所发展或是发生改变。
netstat -nt | grep :22
可以发现上千个 tcp 连接。都是从跳板机连接过来的。但是目前都没有人 ssh 登陆,为何这些连接不会被关闭?
tcp 0 0 192.168.127.52:22 192.168.97.21:37802 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:59866 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:59864 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:36164 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:60074 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:36582 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:59870 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:59980 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:60070 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:60098 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:60086 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:36584 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:36116 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:59852 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:59896 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:37236 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:52126 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:60072 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:60294 ESTABLISHED
tcp 0 0 192.168.127.52:22 192.168.97.21:59968 ESTABLISHED
.....
2 条回复 • 2019-03-10 13:10:35 +08:00
|
|
1
x1314aq 2019-03-10 12:21:12 +08:00 1
ssh 的 server 端有一个配置项,就是一个连接 keep alive 的时间;出现你说的这种情况应该是这个选项被 off 掉了
|
|
|
2
catalina 2019-03-10 13:10:35 +08:00 via Android
有没有人 ssh 登录是看啥看出来的? w 命令吗? 建议 netstat 加个 p 选项看一下,再 pstree 一下看下。 我记得 sftp 登录和 ssh 端口映射功能的会话都不会显示在 w 里面
|