Cisco IOS:显示传入的 Telnet 会话

Cisco IOS:显示传入的 Telnet 会话

根据show ?命令show sessions应该显示Information about Telnet connections。虽然我已连接,但会话未显示。两个设备都运行 Cisco IOS。我如何查找当前的 Telnet 会话?

在运行 Telnet 服务器的路由器上:

 Router2#debug telnet 
 Incoming Telnet debugging is on
 Router2#
 Router2#
 Oct 25 13:34:59.063: Telnet226: 1 1 251 1
 Oct 25 13:34:59.063: TCP226: Telnet sent WILL ECHO (1)
 Oct 25 13:34:59.063: Telnet226: 2 2 251 3
 Oct 25 13:34:59.063: TCP226: Telnet sent WILL SUPPRESS-GA (3)
 Oct 25 13:34:59.063: Telnet226: 80000 80000 253 24
 Oct 25 13:34:59.063: TCP226: Telnet sent DO TTY-TYPE (24)
 Oct 25 13:34:59.063: Telnet226: 10000000 10000000 253 31
 Oct 25 13:34:59.063: TCP226: Telnet sent DO WINDOW-SIZE (31)
 Oct 25 13:34:59.071: TCP226: Telnet received DO SUPPRESS-GA (3)
 Oct 25 13:34:59.075: TCP226: Telnet received WILL TTY-LOCATION (23) (refused)
 Oct 25 13:34:59.079: TCP226: Telnet sent DONT TTY-LOCATION (23)
 Oct 25 13:34:59.083: TCP226: Telnet received WILL TTY-SPEED (32) (refused)
 Oct 25 13:34:59.087: TCP226: Telnet sent DONT TTY-SPEED (32)
 Oct 25 13:34:59.091: TCP226: Telnet received WILL WINDOW-SIZE (31)
 Oct 25 13:34:59.091: TCP226: Telnet received WILL LOCAL-FLOW (33)
 Oct 25 13:34:59.095: TCP226: Telnet sent DO LOCAL-FLOW (33)
 Oct 25 13:34:59.099: Telnet226: Sent SB 33 0 
 Oct 25 13:34:59.099: TCP226: Telnet received DO ECHO (1)
 Oct 25 13:34:59.103: TCP226: Telnet received WONT TTY-TYPE (24)
 Oct 25 13:34:59.103: TCP226: Telnet sent DONT TTY-TYPE (24)
 Oct 25 13:34:59.103: Telnet226: recv SB NAWS 80 24
 Oct 25 13:34:59.107: TCP226: Telnet received WONT TTY-LOCATION (23)
 Oct 25 13:34:59.115: TCP226: Telnet received WONT TTY-SPEED (32)
 Router2#
 Router2#
 Router2#show sessions
 % No connections open
 Router2#

在连接Telnet服务器的路由器上:

 Router2>show sessions
 % No connections open
 Router2>
 Router2>
 Router2>enable
 Password: 
 Router2#     
 Router2#show sessions
 % No connections open
 Router2#

答案1

您正在寻找:

show users(或者像大多数人一样输入sh users

答案2

show sessions将显示从您的交换机/路由器到其他设备的传出连接。

show users将显示到交换机/路由器的 vty 接口 (ssh/telnet...) 的传入连接。

所以我认为你需要show users这里。

答案3

查看谁已连接的其他有用方法包括和who。有关连接的详细信息,您可以使用。show lineshow sshshow tcp

答案4

许多 IOS 版本还支持 who 和 where 命令。who 显示的输出与 show users 相同。where 显示的输出与 show session 相同

相关内容