1. 程式人生 > >在思科路由器上配置SSH登入

在思科路由器上配置SSH登入

使用者那裡對網路安全性進行檢查,要求對核心裝置採用SSH登入,之前裝置採用telnet登入,使用者名稱和密碼明文傳輸,不符合安全性檢查要求。
其實SSH登入配置很簡單,主要分以下幾步:
1、配置域名
SD_Core_R7600(config)#ip domain-name SDCore
2、生成SSH Key
SD_Core_R7600(config)#crypto key generate rsa
The name for the keys will be: SD_Core_R7600.SDCore
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, keys will be non-exportable...[OK]
說明:key的大小根據情況定義
3、啟用aaa new-model
SD_Core_R7600(config)#aaa new-model
4、配置SSH登入時的使用者名稱和密碼
SD_Core_R7600(config)#username cisco secret [email protected]
5、在line上應用SSH登入
SD_Core_R7600(config)#line vty 0 4
SD_Core_R7600(config-line)#transport input ssh
SD_Core_R7600(config-line)#exit
SD_Core_R7600(config)#exit
6、其它可選配置引數
SD_Core_R7600(config)#ip ssh verions 2 設定SSH的版本
SD_Core_R7600(config)#ip ssh time-out 120 設定SSH的超時時間
SD_Core_R7600(config)#ip ssh authentication-retries 3 設定SSH重認證次數

說明:如果還需要進行更進一步的配置,可以參照思科官方文件。