ssh登錄cisco路由器
(轉(zhuǎn)載請(qǐng)注明出處)
R1(config)#ip domain-name prince.com //配置本地域名,用于生成證書。證書包含了公鑰
R1(config)#
R1(config)#crypto key generate rsa //配置使用RSA,生成一對(duì)密鑰
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]: //選擇密鑰的長度。默認(rèn)512。 當(dāng)前路由器的允許范圍是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 //配置賬號(hào)和密碼,用于SSH客戶端登錄
R1(config)#
R1(config)#ip ssh time-out 30 //配置SSH的客戶端的空閑超時(shí)時(shí)間為30秒
R1(config)#ip ssh authentication-retries 3
R1(config)#ip ssh time-out 120 //配置SSH的客戶端的失敗次數(shù)。如果嘗試失敗次數(shù)超過指定端。
//則默認(rèn)停止響應(yīng)120秒。下面一條命令配置停止響應(yīng)時(shí)間
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 閱讀(428) 評(píng)論(0) 編輯 收藏 所屬分類: 硬件網(wǎng)絡(luò)