1、TELNET遠程登陸配置dom
一、配置CISCO路由器上登陸帳號、口令、帳號級別,以下所示,帳號名abc、口令爲abc123、帳號級別爲15(最高級別)ssh
R1#configure terminal ide
R1(config)#username abc privilege 15 secret abc123spa
R1(config)#end ip
R1#路由
二、配置CISCO路由器遠程登陸認證機制,以下所示,配置路由器本地認證terminal
R1#configure terminal input
R1(config)#line vty 0 4域名
R1(config-line)#login local it
R1(config-line)#end
R1#
三、完成以上配置後,便可實現TELNET登陸
2、SSH遠程登陸配置
一、配置SSH遠程登陸前,須要先配置上面兩個步驟
二、配置CISCO路由器所在域名,以下所示,域名爲idc
R1(config)#ip domain-name idc
三、配置CISCO路由器生成密鑰,路由器提供配置密鑰位數,完成該配置後,路由器自動啓動SSH服務,能夠使用show ip ssh命令查看驗證
R1(config)#ip domain-name idc
R1(config)#crypto key generate rsa
The name for the keys will be: R1.idc
Choose the size of the key modulus in the range of 360 to 2048 foryour
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]
R1(config)#
*Aug 13 15:08:21.575: %SSH-5-ENABLED: SSH 1.99 has been enabled
R1(config)#
四、配置CISCO路由器容許經過SSH遠程登陸,以下所示,TELNET和SSH均容許遠程登陸,若限制TELNET遠程登陸,則transportinput後不要帶telnet便可。
R1(config)#line vty 0 4
R1(config-line)#transport input telnet ssh
R1(config-line)#end
R1#
五、完成以上配置後,便可實現SSH登陸
路由器版本信息:CiscoIOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), ExperimentalVersion 12.4(20090407:185408)