在CISCO交换机上配置SSH
来源:互联网 发布:韩世远合同法总论知乎 编辑:程序博客网 时间:2024/05/20 13:11
在Cisco路由器产品系列中只有7200系列、7500系列和12000系列(GSR)等高端产品的IOS支持SSH.一般支持SSH的IOS版本文件名中都带有K3或者K4字样,K3 代表56bit SSH 加密,K4代表168bit SSH加密。如我省省网GSR 12016和12008上用的IOS 就是一个支持56bit SSH 加密的版本。
目前Cisco的产品只支持SSH-1,还不支持SSH-2.下面以GSR 12008为例详细介绍SSH-1的配置方法(斜体字为配置输入的命令):
① 配置hostname和ip domain-name:
Router#configure terminalRouter(config)#hostname TEST-GSR12008TEST-GSR12008(config)#ip domain-name jx.cn.net
② 配置登录用户名和密码(以本地认证为例):
TEST-GSR12008(config)#username test password 0 test 注:添加一个用户:test,口令:testTEST-GSR12008(config)#line vty 0 4 TEST-GSR12008(config-line)#login local
在这两部分做完以后,用show run命令就能够看到:
hostname TEST-GSR12008!boot system flash gsr-k3p-mz.120-14.S.binenable secret 5 $1$DMyW$gdSIOkCr7p8ytwcRwtnJG.enable password 7 094F47C31A0A!username test password 7 0835495D1Dclock timezone PRC 16redundancymain-cpuauto-sync startup-config!!!!ip subnet-zerono ip fingerip domain-name jx.cn.netip name-server 202.101.224.68ip name-server 202.101.226.68 !
③ 配置SSH服务:
TEST-GSR12008(config)#crypto key generate rsaThe name for the keys will be: TEST-GSR12008.jx.cn.net注:SSH的关键字名就是hostname + . +ip domain-nameChoose the size of the key modulus in the range of 360 to 2048 for yourGeneral Purpose Keys. Choosing a key modulus greater than 512 may takea few minutes.How many bits in the modulus [512]: 注:选择加密位数,用默认就行了Generating RSA keys ...[OK]TEST-GSR12008(config)#endTEST-GSR12008#writeBuilding configuration...
这时候用show run命令可以看到:
ip subnet-zerono ip fingerip domain-name jx.cn.netip name-server 202.101.224.68ip name-server 202.101.226.68ip ssh time-out 120ip ssh authentication-retries 3 !
用命令show ip ssh也能看到:
SSH Enabled - version 1.5 Authentication timeout: 120 secs; Authentication retries: 3
现在SSH服务已经启动,如果需要停止SSH服务,用以下命令:
TEST-GSR12008(config)#crypto key zeroize rsa
④设置SSH参数
配置好了SSH之后,通过show run命令我们看到SSH默认的参数:超时限定为120秒,认证重试次数为3次,可以通过下面命令进行修改:
TEST-GSR12008(config)#ip ssh {[time-out seconds]} | [authentication-retries interger]}
如果要把超时限定改为180秒,则应该用:
TEST-GSR12008(config)# ip ssh time-out 180
如果要把重试次数改成5次,则应该用:
TEST-GSR12008(config)# ip ssh authentication-retries 5
这样,SSH已经在路由器上配置成功了,就能够通过SSH进行安全登录了
- 在CISCO交换机上配置SSH
- Cisco 交换机/路由器 ssh 配置
- 如何在Cisco交换机上配置语音VLAN
- Tftp在cisco交换机上的使用
- CISCO 交换机的配置
- Cisco交换机配置基础
- cisco交换机配置
- cisco交换机配置
- cisco 交换机2960配置
- cisco交换机配置命令
- Cisco交换机初始化配置
- Cisco交换机初始化配置
- cisco交换机配置(一)
- cisco交换机配置
- Cisco交换机 SNMP配置
- SSH在Cisco设备上设置实例
- 在Cisco路由器上用ssh登陆
- CISCO交换机VLAN配置指南
- 开源网络教学平台SAKAI开发环境的搭建
- 当你扛不住的时候就读一遍
- 各种数据库 hibernate 配置文件的配置
- response.sendRedirect(location)与rd.forward()区别
- c++中的泛型
- 在CISCO交换机上配置SSH
- JDK1.5中的线程池(java.util.concurrent.ThreadPoolExecutor)使用简介
- mentohust && 无线热点
- C#中string[]数组和list<string>泛型的相互转换
- Delphi操作word兼容性问题解决方法
- 程序、进程、内存映射
- MSR初步理解
- [Asp.net4.0]基于.NET Framework 4.0的解决方案部署
- 电讯盈科(pccw)面试题。