ip ssh port 2001 rotary 1 line 1 16 no exec rotary 1 transport input ssh exec-timeout 0 0 modem In Out Stopbits 1 假如Philly附有Carter端口2,我们会SSH 对Philly 通过卡特从Reed用以下命令:
carter#show ssh Connection Version Encryption State Username 0 1.5 DES session started cisco
show ip ssh - 显示版 本和配置数据为SSH。
carter#sho ip ssh SSH Enabled - version 1.5 Authentication timeout: 60 secs; Authentication retries: 2
示例调试输出 注重一些此"好"调试输出包裹对多条线路由于间距注 意事项。
路由器调试 00:23:20: SSH0: starting SSH control process 00:23:20: SSH0: sent protocol version id SSH-1.5-Cisco-1.25 00:23:20: SSH0: protocol version id is - SSH-1.5-1.2.26 00:23:20: SSH0: SSH_SMSG_PUBLIC_KEY msg 00:23:21: SSH0: SSH_CMSG_SESSION_KEY msg - length 112, type 0x03 00:23:21: SSH: RSA decrypt started 00:23:21: SSH: RSA decrypt finished 00:23:21: SSH: RSA decrypt started 00:23:21: SSH: RSA decrypt finished 00:23:21: SSH0: sending encryption confirmation 00:23:21: SSH0: keys exchanged and encryption on 00:23:21: SSH0: SSH_CMSG_USER message received 00:23:21: SSH0: authentication request for userid cisco 00:23:21: SSH0: SSH_SMSG_FAILURE message sent 00:23:23: SSH0: SSH_CMSG_AUTH_PASSWORD message received 00:23:23: SSH0: authentication sUCcessful for cisco 00:23:23: SSH0: requesting TTY 00:23:23: SSH0: setting TTY - requested: length 24, width 80; set: length 24, width 80 00:23:23: SSH0: invalid request - 0x22 00:23:23: SSH0: SSH_CMSG_EXEC_SHELL message received 00:23:23: SSH0: starting shell for vty
服务器调试 注重: 此输出在Solaris 设备 被获取了。
rtp-evergreen.rtp.cisco.com# ssh -c 3des -l cisco -v 10.31.1.99 rtp-evergreen# /opt/CISssh/bin/ssh -c 3des -l cisco -v 10.13.1.99 SSH Version 1.2.26 [sparc-sun-solaris2.5.1], protocol version 1.5. Compiled with RSAREF. rtp-evergreen: Reading configuration data /opt/CISssh/etc/ssh_config rtp-evergreen: ssh_connect: getuid 0 geteuid 0 anon 0 rtp-evergreen: Allocated local port 1023. rtp-evergreen: Connecting to 10.13.1.99 port 22. rtp-evergreen: Connection established. rtp-evergreen: Remote protocol version 1.5, remote software version Cisco-1.25 rtp-evergreen: Waiting for server public key. rtp-evergreen: Received server public key (768 bits) and host key (512 bits). rtp-evergreen: Host '10.13.1.99' is known and matches the host key. rtp-evergreen: Initializing random; seed file //.ssh/random_seed rtp-evergreen: Encryption type: 3des rtp-evergreen: Sent encrypted session key. rtp-evergreen: Installing crc compensation attack detector. rtp-evergreen: Received encrypted confirmation. rtp-evergreen: Doing password authentication. cisco@10.13.1.99's password: rtp-evergreen: Requesting pty. rtp-evergreen: Failed to get local xauth data. rtp-evergreen: Requesting X11 forwarding with authentication spoofing. Warning: Remote host denied X11 forwarding, perhaps xauth program could not be run on the server side. rtp-evergreen: Requesting shell. rtp-evergreen: Entering interactive session.
错在何处 下面是示例调试输出从几个不正确的配置。
SSH从SSH 客户端没被编译带有数据加密标准 (DES)
Solaris调试 rtp-evergreen# /opt/CISssh/bin/ssh -c des -l cisco -v 10.13.1.99 SSH Version 1.2.26 [sparc-sun-solaris2.5.1], protocol version 1.5. Compiled with RSAREF. rtp-evergreen: Reading configuration data /opt/CISssh/etc/ssh_config rtp-evergreen: ssh_connect: getuid 0 geteuid 0 anon 0 rtp-evergreen: Allocated local port 1023. rtp-evergreen: Connecting to 10.13.1.99 port 22. rtp-evergreen: Connection established. rtp-evergreen: Remote protocol version 1.5, remote software version Cisco-1.25 rtp-evergreen: Waiting for server public key. rtp-evergreen: Received server public key (768 bits) and host key (512 bits). rtp-evergreen: Host '10.13.1.99' is known and matches the host key. rtp-evergreen: Initializing random; seed file //.ssh/random_seed rtp-evergreen: Encryption type: des rtp-evergreen: Sent encrypted session key. cipher_set_key: unknown cipher: 2
路由器调试
00:24:41: SSH0: Session terminated normally 00:24:55: SSH0: starting SSH control process 00:24:55: SSH0: sent protocol version id SSH-1.5-Cisco-1.25 00:24:55: SSH0: protocol version id is - SSH-1.5-1.2.26 00:24:55: SSH0: SSH_SMSG_PUBLIC_KEY msg 00:24:55: SSH0: SSH_CMSG_SESSION_KEY msg - length 112, type 0x03 00:24:55: SSH: RSA decrypt started 00:24:56: SSH: RSA decrypt finished 00:24:56: SSH: RSA decrypt started 00:24:56: SSH: RSA decrypt finished 00:24:56: SSH0: sending encryption confirmation 00:24:56: SSH0: Session disconnected - error 0x07
错误密码 路由器调试 00:26:51: SSH0: starting SSH control process 00:26:51: SSH0: sent protocol version id SSH-1.5-Cisco-1.25 00:26:52: SSH0: protocol version id is - SSH-1.5-1.2.26 00:26:52: SSH0: SSH_SMSG_PUBLIC_KEY msg 00:26:52: SSH0: SSH_CMSG_SESSION_KEY msg - length 112, type 0x03 00:26:52: SSH: RSA decrypt started 00:26:52: SSH: RSA decrypt finished 00:26:52: SSH: RSA decrypt started 00:26:52: SSH: RSA decrypt finished 00:26:52: SSH0: sending encryption confirmation 00:26:52: SSH0: keys exchanged and encryption on 00:26:52: SSH0: SSH_CMSG_USER message received 00:26:52: SSH0: authentication request for userid cisco 00:26:52: SSH0: SSH_SMSG_FAILURE message sent 00:26:54: SSH0: SSH_CMSG_AUTH_PASSWORD message received 00:26:54: SSH0: password authentication failed for cisco 00:26:54: SSH0: SSH_SMSG_FAILURE message sent 00:26:54: SSH0: authentication failed for cisco (code=7) 00:26:54: SSH0: Session disconnected - error 0x07
SSH客户端发送不支持的(Blowfish) 密码 路由器调试 00:39:26: SSH0: starting SSH control process 00:39:26: SSH0: sent protocol version id SSH-1.5-Cisco-1.25 00:39:26: SSH0: protocol version id is - SSH-1.5-W1.0 00:39:26: SSH0: SSH_SMSG_PUBLIC_KEY msg 00:39:26: SSH0: SSH_CMSG_SESSION_KEY msg - length 112, type 0x03 00:39:26: SSH0: Session disconnected - error 0x20