前言
本文讨论配置和调试安 全外壳( H)在运行的Cisco IOS软件的版本支持 H® Cisco 路由器或交换机。欲知关于特定 版本和软件镜象的,下面请参阅更多信息。
使 用的组件
本文的信息根 据以下的软件及硬件版本。
-
Cisco IOS 3600软件(C3640-IK9S-M),版本 12.2(2)T1
H介绍到 IOS platforms/images如下所示。
-
H版本1.0 ( Hv1)服务器在起动在12.0.5.S 的一 些IOS platforms/images被引入了。
-
H客户端在开始在12.1.3.T的一些IOS platforms/images介绍。
-
H终端线 路接入(亦称反向Telnet)在开始在12.2.2.T的一些 IOS platforms/images被引入。
-
关 于信息关于 H技术支持在交换机,参见 如何 配置 H在运行CatcOs的Catalyst交换机。
关于一张完全特性集列表不同的平台 支持用不同的Cisco IOS版本和,参见 软件 顾问 (注册的用户)。
本文提供的信息在特定实验室环境里从设备被创建了 。用于本文的所有设备开始了以一个缺省(默认)配置。 如果在一个真实网络工作,保证您使用它以前了解所有命令 的潜在影响。
Hv1与 Hv2
此时,IOS只支持 Hv1; Cisco没有计划实现 Hv2。有此的几个原因,如下所述。
Cisco在Cisco IOS实现 H当IP安全(I ec) 通过互 联网工程任务组(IETF)被开发。在I ec 开发过程期间,而 H的实施在IOS是更多一项战术措施提供接入路由器一个安全的方 法I ec 是核心功能。Cisco投入人员维护 H功能为修正, 但增进将制定要求低优先级。Cisco 做到配置I ec为获取 所有数据流,包括管理数据流到/从Cisco网络设备。
如果弱点在 Hv1的协议或实施被发 现,将制定他们的复核最优先考虑的事,和所有潜在安全漏洞。 注意Cisco IOS编码不是相同作为代码在UNIX、Windows,或 者所有其他设备查找。同样地,一个编码问题在那些实施之 一中在Cisco IOS很可能不会查找。 另外,不是所有的 Hv1 功能在Cisco实施可以被发现。值得注意, H在Cisco IOS不 提供"会话转发",亦不提供建立隧道X11。 缺陷在通用代码 的这些部分不会是一个问题在Cisco IOS。如果任何申明的协 议缺陷回顾表示, Hv1协议在Cisco IOS是根本上残破的,则Cisco 确定那时移植到 Hv2是否是适当的。
网络图
测试认证
测试认证没有 H
我们测试认证没有 H首先将确信,认证通过用路由器卡特在添加 H之前。 认 证可以用运行TACACS+或RADIUS的验证、授权和记帐(AAA)服务器是 带有一个本地用户名/密码或。(认证通过线路密码不是可能 的与 H。) 下面的示例显示本地认证,让我们远程登录到路 由器带有用户名"cisco" 和密码"cisco"。
!--- aaa new-model causes the local username/pa word on the router
!--- to be used in the a ence of other aaa statements.
aaa new-model
username cisco pa word 0 cisco
line vty 0 4
!--- I tead of aaa new-model, the login local command may be used.
测试认证与 H
对测试认证与 H, 我们在卡特补充说到前面的语句,启用 H和测试 H从PC和UNIX 工作站。
ip domain-name rtp.cisco.com !--- Generate an H key to be used with H. cry key generate rsa ip h time-out 60 ip h authentication-retries 2
这时,显示 生成的键, show cry key mypubkey rsa命令应该。在添加 H配置以后 ,我们测试访问路由器从PC和UNIX 工作站。
[page]
可选配置设 置
防止Non- H连接
如果我们想要防止non- H连接,我们添加 tra ort i ut H 在 线路之下对仅 H连接限制路由器。平直的 (non- H) Telnets将拒绝。
line vty 0 4 !--- Prevent non- H Telnets. tra ort i ut h
我们测 试是确保的non- H用户不能远程登录到路由器卡特。
设置IOS 路由器或交换机作为 H 客户端
有为启用 H技术支持要求的四个步骤在IOS路由器。
-
配置 hostname命令。
-
配置D 域。
-
生成将使用的 H键。
-
启用 H vtys的传输技术支持。
如果我们想要有一次设备操作作为 H 客户端对其 他,我们能添加 H到第二个设备,Reed。设备然后在客户端 服务器排列,用作为服务器和Reed的卡特作为客户端。 IOS H客户端配置在Reed是相同象为 H 服务器配置需要 在卡特。
!--- Step 1: Configure hostname if you have not previously done so.
hostname carter
!--- aaa new-model causes the local username/pa word on the router
!--- to be used in the a ence of other AAA statements.
aaa new-model
username cisco pa word 0 cisco
!--- Step 2: Configure the router's D domain.
ip domain-name rtp.cisco.com
!--- Step 3: Generate an H key to be used with H.
cry key generate rsa
ip h time-out 60
ip h authentication-retries 2
!--- Step 4: By default the vtys' tra ort is Telnet. In this case,
!--- Telnet has been disabled and only H is su orted.
line vty 0 4
tra ort i ut H
!--- I tead of aaa new-model, the login local command may be used.
测试此,发出以下命令对 H从IOS H 客户端(Reed)到IOS H服务器(卡特):
h -l cisco -c 3des 10.13.1.99
添加 H 终端线路接入
如果 我们需要出局 H终端线路验证,我们能为出局反向Telnet配置和测 试 H通过卡特,作为通用服务器对Philly。
ip h port 2001 rotary 1
line 1 16
no exec
rotary 1
tra ort i ut h
exec-timeout 0 0
modem In Out
Sto its 1
如果Philly附有Carter端口2,我们会 H 对Philly 通过卡特从Reed用以下命令:
h -c 3des -p 2002 10.13.1.99
从 Solaris,我们会使用以下命令:
h -c 3des -p 2002 -x -v 10.13.1.99
[page]
debug及show命令
在发出如下 被描述和说明的debug命令 之前,请参阅 重要信息关于Debug命令。 输 出解释器工具支持 某些show命令 (注 册的用户),允许您查看show命令输出分析 。
debug IP H - 显示调 试消息为 H。
show H - 显示 H服 务器连接状态。
carter#show h
Co ectio Version Encryptio State Username
0 1.5 DE Se ion started cisco
show ip h - 显示版 本和配置数据为 H。
carter#sho ip h
H Enabled - version 1.5
Authentication timeout: 60 sec Authentication retries: 2
示例调试输出
注意一些此"好"调试输出包裹对多条线路由于间距注 意事项。
00:23:20: H0: starting H control proce
00:23:20: H0: sent protocol version id H-1.5-Cisco-1.25
00:23:20: H0: protocol version id is - H-1.5-1.2.26
00:23:20: H0: H_SMSG_PUBLIC_KEY msg
00:23:21: H0: H_CMSG_SE ION_KEY msg - length 112, type 0x03
00:23:21: H: RSA decrypt started
00:23:21: H: RSA decrypt finished
00:23:21: H: RSA decrypt started
00:23:21: H: RSA decrypt finished
00:23:21: H0: sending encryption confirmation
00:23:21: H0: keys exchanged and encryption on
00:23:21: H0: H_CMSG_USER me age received
00:23:21: H0: authentication request for userid cisco
00:23:21: H0: H_SMSG_FAILURE me age sent
00:23:23: H0: H_CMSG_AUTH_PA WORD me age received
00:23:23: H0: authentication succe ful for cisco
00:23:23: H0: requesting TTY
00:23:23: H0: setting TTY - requested: length 24, width 80; set:
length 24, width 80
00:23:23: H0: invalid request - 0x22
00:23:23: H0: H_CMSG_EXEC_SHELL me age received
00:23:23: H0: starting shell for vty
服务器调试
注意: 此输出在Solaris 设备 被获取了。
rtp-evergreen.rtp.cisco.com# h -c 3des -l cisco -v 10.31.1.99
rtp-evergreen# /opt/CI h/bin/ h -c 3des -l cisco -v 10.13.1.99
H Version 1.2.26 [ arc-sun-solaris2.5.1], protocol version 1.5.
Compiled with RSAREF.
rtp-evergreen: Reading configuration data /opt/CI h/etc/ h_config
rtp-evergreen: h_co ect: getuid 0 geteuid 0 anon 0
rtp-evergreen: Allocated local port 1023.
rtp-evergreen: Co ecting to 10.13.1.99 port 22.
rtp-evergreen: Co ection 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 //. h/random_seed
rtp-evergreen: Encryption type: 3des
rtp-evergreen: Sent encrypted se ion key.
rtp-evergreen: I talling crc compe ation attack detector.
rtp-evergreen: Received encrypted confirmation.
rtp-evergreen: Doing pa word authentication.
cisco@10.13.1.99's pa word:
rtp-evergreen: Requesting pty.
rtp-evergreen: Failed to get local xauth data.
rtp-evergreen: Requesting X11 forwarding with authentication oofing.
Warning: Remote host denied X11 forwarding, perha xauth program
could not be run on the server side.
rtp-evergreen: Requesting shell.
rtp-evergreen: Entering interactive se ion.
错在何处
下面是示例调试输出从几个不正确的配置。
H从 H 客户端没被编译带有数据加密标准 (DES)
Solaris调试
rtp-evergreen# /opt/CI h/bin/ h -c des -l cisco -v 10.13.1.99
H Version 1.2.26 [ arc-sun-solaris2.5.1], protocol version 1.5.
Compiled with RSAREF.
rtp-evergreen: Reading configuration data /opt/CI h/etc/ h_config
rtp-evergreen: h_co ect: getuid 0 geteuid 0 anon 0
rtp-evergreen: Allocated local port 1023.
rtp-evergreen: Co ecting to 10.13.1.99 port 22.
rtp-evergreen: Co ection 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 //. h/random_seed
rtp-evergreen: Encryption type: des
rtp-evergreen: Sent encrypted se ion key.
cipher_set_key: unknown cipher: 2
00:24:41: H0: Se ion terminated normally
00:24:55: H0: starting H control proce
00:24:55: H0: sent protocol version id H-1.5-Cisco-1.25
00:24:55: H0: protocol version id is - H-1.5-1.2.26
00:24:55: H0: H_SMSG_PUBLIC_KEY msg
00:24:55: H0: H_CMSG_SE ION_KEY msg - length 112, type 0x03
00:24:55: H: RSA decrypt started
00:24:56: H: RSA decrypt finished
00:24:56: H: RSA decrypt started
00:24:56: H: RSA decrypt finished
00:24:56: H0: sending encryption confirmation
00:24:56: H0: Se ion disco ected - error 0x07
错误密码
路由器调试
00:26:51: H0: starting H control proce
00:26:51: H0: sent protocol version id H-1.5-Cisco-1.25
00:26:52: H0: protocol version id is - H-1.5-1.2.26
00:26:52: H0: H_SMSG_PUBLIC_KEY msg
00:26:52: H0: H_CMSG_SE ION_KEY msg - length 112, type 0x03
00:26:52: H: RSA decrypt started
00:26:52: H: RSA decrypt finished
00:26:52: H: RSA decrypt started
00:26:52: H: RSA decrypt finished
00:26:52: H0: sending encryption confirmation
00:26:52: H0: keys exchanged and encryption on
00:26:52: H0: H_CMSG_USER me age received
00:26:52: H0: authentication request for userid cisco
00:26:52: H0: H_SMSG_FAILURE me age sent
00:26:54: H0: H_CMSG_AUTH_PA WORD me age received
00:26:54: H0: pa word authentication failed for cisco
00:26:54: H0: H_SMSG_FAILURE me age sent
00:26:54: H0: authentication failed for cisco (code=7)
00:26:54: H0: Se ion disco ected - error 0x07
H客户端发送不支持的(Blowfish) 密码
路由器调试
00:39:26: H0: starting H control proce
00:39:26: H0: sent protocol version id H-1.5-Cisco-1.25
00:39:26: H0: protocol version id is - H-1.5-W1.0
00:39:26: H0: H_SMSG_PUBLIC_KEY msg
00:39:26: H0: H_CMSG_SE ION_KEY msg - length 112, type 0x03
00:39:26: H0: Se ion disco ected - error 0x20


