博客统计信息

用户名:thief8310
文章数:82
评论数:7
访问量:47060
无忧币:22
博客积分:734
博客等级:4
注册日期:2008-07-08

我的技术圈(2)

更多>>
cisco SSH 配置示例及详解
2009-07-08 17:44:22
使用telnet进行远程设备维护的时候,由于密码和通讯都是明文的,易受sniffer侦听,所以应采用SSH替代telnet。SSH (Secure Shell)服务使用tcp 22 端口,客户端软件发起连接请求后从服务器接受公钥,协商加密方法,成功后所有的通讯都是加密的。Cisco 设备目前支持SSH v1、v2,目前几乎所有cisco路由交换产品均支持SSH但要求IOS版本支持安全特性。Cisco实现 SSH的目的在于提供较安全的设备管理连接,不适用于主机到主机的通讯加密。 SSH协议要在12.1(11)以上的IOS版本才被cisco设备支持的.
 
1、启用AAA的SSH配置:
ip domain-name runway.cn.net-------------------------------------------设置域名
aaa new-modle----------------------------------------------------------启用AAA服务
crypto key generate rsa------------------------------------------------生成秘钥
The name for the keys will be: Router1.runway.cn.net
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]: 1024-------------------------------指定1024位秘钥
% Generating 1024 bit RSA keys ...[OK]
username sshuser secret sshpassword------------------------------------指定SSH登陆用户名和密码
ip ssh time-out 30-----------------------------------------------------设定SSH超时值
no ip ssh version------------------------------------------------------启用SSH V1 V2
aaa authentication login ssh local line none---------------------------设定SSH登陆信息存储地方
ip access-list standard forssh-----------------------------------------定义SSH登陆源地址
permit any

line vty 0 4
exec-timeout 30------------------------------------------------------设置线路登陆超时值
login authentication ssh---------------------------------------------指定验证登陆用户信息存储的地方
transport input ssh--------------------------------------------------设置线路登陆模式为SSH
access-class forssh in-----------------------------------------------应用访问列表
 
2、不启用AAA的SSH配置
hostname Router1
ip domain-name runway.cn.net
crypto key generate rsa
The name for the keys will be: Router1.runway.cn.net
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]: 1024
% Generating 1024 bit RSA keys ...[OK]
username sshuser secret sshpassword
ip ssh time-out 30
no ip ssh version
ip access-list standard forssh
permit any

line vty 0 4
exec-timeout 30
login local
transport input ssh
access-class forssh in
分享至
更多
一键收藏,随时查看,分享好友!
0人
了这篇文章
类别:CISCO技术圈()┆阅读()┆评论() ┆ 推送到技术圈返回首页

文章评论

 
 

发表评论            

【技术门诊】专家解析:软考重点难点及应试技巧
昵  称:
登录  快速注册
验证码:

请点击后输入验证码博客过2级,无需填写验证码

内  容: