码迷,mamicode.com
首页 > 系统相关 > 详细

cisco+H3C交换机SSH配置实例

时间:2016-06-09 16:05:45      阅读:319      评论:0      收藏:0      [点我收藏+]

标签:交换机配置   cisco   密码   用户   ssh   交换机ssh配置   

Cisco交换机+H3C交换机SSH配置(cisco关闭Telnet

Cisco交换机

  1. 进入交换机配置模式:

  2. a)        CoreSW#configure terminal

  3. 配置交换机名称:

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

  5. 配置domain-name

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

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

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

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

  10. a)        CoreSW(config)#line vty 0 4

  11. b)        CoreSW(config-line)#login local

  12. SSH服务配置:

  13. a)        CoreSW(config)#crypto keygenerate rsa

The name for the keys will be: CoreSW.xxxxxx.com

Choose the size of the key modulus inthe range of 360 to 4096 for your

General Purpose Keys. Choosing a keymodulus greater than 512 may take

a 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)

  1. 保存配置。

  2. a)        CoreSW#copy running-configstartup-config

  3. 配置SSH超时时间。

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

  5. 配置重复登录次数。

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

  7. 配置SSH版本

  8. a)        CoreSW(config)#ip ssh version 2

10.测试SSH方式连接交换机。

===============================到此处配置已完成================================

 

H3C交换机

 

  1. 生成RSADSA秘钥对

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

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

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

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

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

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

  8. 用户设置

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

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

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

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

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

  14. 指定用户认证方式为password

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

===============================到此处配置已完成================================


本文出自 “天道” 博客,请务必保留此出处http://chudi.blog.51cto.com/7542593/1787633

cisco+H3C交换机SSH配置实例

标签:交换机配置   cisco   密码   用户   ssh   交换机ssh配置   

原文地址:http://chudi.blog.51cto.com/7542593/1787633

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!