ssh登录cisco路由器

(转载请注明出处)

R1(config)#ip domain-name prince.com  //配置本地域名,用于生成证书。证书包含了公钥
R1(config)#
R1(config)#crypto key generate rsa     //配置使用RSA,生成一对密钥 
The name for the keys will be: R1.prince.com    //密钥的名称
Choose the size of the key modulus in the range of 360 to 2048 for your
  General Purpose Keys. Choosing a key modulus greater than 512 may take
  a few minutes.
How many bits in the modulus [512]:    //选择密钥的长度。默认512。 当前路由器的允许范围是360到2048位的长度
% Generating 512 bit RSA keys, keys will be non-exportable...[OK]
R1(config)#
R1(config)#aaa new-model          //配置AAA模式
R1(config)#
R1(config)#username prince secret 820929    //配置账号和密码,用于SSH客户端登录
R1(config)#
R1(config)#ip ssh time-out 30          //配置SSH的客户端的空闲超时时间为30秒
R1(config)#ip ssh authentication-retries 3   
R1(config)#ip ssh time-out 120         //配置SSH的客户端的失败次数。如果尝试失败次数超过指定端。
                                       //则默认停止响应120秒。下面一条命令配置停止响应时间
R1(config)#
R1(config)#line vty 0 4
R1(config-line)#transport input ssh    //配置VTY的线路,接受SSH的接入
R1(config-line)#end

posted on 2011-02-01 17:44 prince 阅读(406) 评论(0)  编辑  收藏 所属分类: 硬件网络


只有注册用户登录后才能发表评论。


网站导航:
 
<2011年2月>
303112345
6789101112
13141516171819
20212223242526
272812345
6789101112

导航

统计

常用链接

留言簿(4)

随笔分类(72)

相册

blog友人

搜索

最新评论

阅读排行榜