您的位置:首页 > 其它

cisco+H3C交换机SSH配置实例

2016-06-09 14:28 309 查看
Cisco交换机+H3C交换机SSH配置(cisco关闭Telnet)Cisco交换机
进入交换机配置模式:

a) CoreSW#configure terminal

配置交换机名称:

a) CoreSW(config)#hostname CoreSW(可选配置)。

配置domain-name:

a) CoreSW(config)#ip domain-namexxxxx.com(名称按自己要求而定)。

配置登录用户和密码(如有本地用户可不创建)。

a) CoreSW(config)#username testpassword 0 test(密码类型自选)。

配置可连接的虚拟终端数:

a) CoreSW(config)#line vty 0 4

b) CoreSW(config-line)#login local

SSH服务配置:

a) CoreSW(config)#crypto keygenerate rsa

The name for the keys will be: CoreSW.xxxxxx.comChoose the size of the key modulus inthe range of 360 to 4096 for yourGeneral Purpose Keys. Choosing a keymodulus greater than 512 may takea few minutes.How many bits in the modulus [512]:CoreSW.xxxxx.com% A decimal number between 360 and4096.How many bits in the modulus [512]: (这里我选的是默认,也就是直接回车,也可以自己定义。)% Generating 512 bit RSA keys, keyswill be non-exportable...[OK] (elapsed time was 2 seconds)。保存配置。

a) CoreSW#copy running-configstartup-config

配置SSH超时时间。

a) CoreSW(config)#ip ssh time-out120

配置重复登录次数。

a) CoreSW(config)#ip sshauthentication-retries 5

配置SSH版本

a) CoreSW(config)#ip ssh version 2

10.测试SSH方式连接交换机。===============================到此处配置已完成================================

H3C交换机

生成RSA和DSA秘钥对

a) [HJSW-5500-10]public-key localcreate rsa(输入Y即可)

b) [HJSW-5500-10]public-key localcreate dsa(直接回车即可)

设置用户登录认证和接口协议

a) [HJSW-5500-10]user-interfacevty 0 4

b) [HJSW-5500-10-ui-vty0-4]authentication-modescheme

c) [HJSW-5500-10-ui-vty0-4]protocolinbound ssh

用户设置

a) 如有相关用户可不创建新的用户。

b) 创建新用户命令如下:

c) [HJSW-5500-10]local-user user-name

d) [HJSW-5500-10-luser-xxxxx]authorization-attributelevel 3(用户级别)

e) [HJSW-5500-10-luser-xxxxx]service-typessh (服务类型)

指定用户认证方式为password

a) [HJSW-5500-10]ssh userwangchuyuan service-type all authentication-type password

===============================到此处配置已完成================================
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  交换机 Cisco 配置