CISCO设备配置SSH 登陆
1. 设置设备域名CISCO
ip domain name CISCO
2.创建密钥
Server(config)#crypto key generate rsa
The name for the keys will be: Server.test.com
Choose the size of the key modulus in the range of 360 to 4096 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 2048 #设置秘钥长度
% Generating 2048 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 7 seconds)
3.设置本地用户登陆与密码
username xxxx secret cisco
4.配置VTY
line vty 0 4
transport input ssh
5.设置SSH设置
Server(config)#ip ssh time-out 120 #ssh超时时间
Server(config)#ip ssh authentication-retries 2 #ssh认证失败的次数
Server(config)#ip ssh version 2 #ssh的版本
Server(config)#ip ssh source-interface fastEthernet 0/0 #指定接口如果有vlan也可以,当指定接口后设备上的其他接口就不能被ssh