1.IOS设备(如6500 MSFC、8500、7500)的配置:

  a) 软件需求

  IOS版本12.0.(10)S 以上 含IPSEC 56 Feature

  推荐使用 IOS 12.2 IP PLUS IPSEC 56C以上版本

  基本上Cisco全系列路由器都已支持,但为运行指定版本的软件您可能需要相应地进行硬件升级

  b) 定义用户

  user mize pass [email]nnwh@163.net[/email]

  user sense secret ssn

  d) 定义域名

  ip domain-name mize.myrice.com //配置SSH必需

  e) 生成密钥

  crypto key generate rsa modulus 2048

  执行结果:

The name for the keys will be: 6509-mize.myrice.com 
% The key modulus size is 2048 bits 
Generating RSA keys ... 
[OK]

  f)指定可以用SSH登录系统的主机的源IP地址

access-list 90 remark Hosts allowed to SSH in //低版本可能不支持remark关键字 
access-list 90 permit 10.10.1.100 
access-list 90 permit 10.10.1.101

  g) 限制登录

line con 0 
login local 
line vty 0 4 
login local //使用本地定义的用户名和密码登录 
transport input SSH //只允许用SSH登录(注意:禁止telnet和从交换引擎session!) 
access-class 90 in //只允许指定源主机登录

转载于:https://blog.51cto.com/swver/67111