路由器遠(yuǎn)程管理的配置命令(網(wǎng)件路由器遠(yuǎn)程管理如何設(shè)置)

一、路由器配置:【同一廠家路由器的配置模式的基本命令跟交換機(jī)一樣,命令見前面的文章】
Router>en
Router#show ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
Router#configure terminal
Router(config)#int f0/0
為端口配置IP:
Router(config-if)#ip address 10.1.1.254 255.255.255.0
Router(config-if)#no shutdown【路由器端口默認(rèn)是down,需要人工開啟】
————————————————
二、開啟路由器的遠(yuǎn)程控制設(shè)置登錄密碼:
方式一:設(shè)置密碼登錄遠(yuǎn)程訪問【全局配置模式下進(jìn)行配置】
Router(config)# line vty 0 4 【進(jìn)入虛擬端口即遠(yuǎn)程端口】
Router(config-line)#password 123 【設(shè)置遠(yuǎn)程登錄密碼(默認(rèn)是telnet)】
Router(config-line)#login 【開啟登錄認(rèn)證】
Router(config-line)#exit
Router(config)#
————————————————
默認(rèn)是Telnet【23端口】,可以用下面命令采用ssh鏈接
ming(config-line)#transport input ?
all All protocols
none No protocols
ssh TCP/IP SSH protocol
telnet TCP/IP Telnet protocol
————————————————
方式二:開啟ssh方式登錄
設(shè)置ssh登錄的密碼需要【全局模式下】配置安全秘鑰:
Router(config)#hostname ming 【設(shè)置路由名稱】
ming(config)#ip domain-name r1.qf.com 【設(shè)置域名】
ming(config)#crypto key generate rsa【生產(chǎn)密鑰對(duì)】
----------- -------- -----
ming(config)#line vty 0
ming(config-line)#transport input ssh【設(shè)置登錄方式為ssh】
ming(config-line)#password 123456【設(shè)置ssh登錄密碼】
ming(config-line)#login【開啟登錄認(rèn)證】
Router(config-line)#exit
Router(config)#
方式三:設(shè)置用本地賬戶遠(yuǎn)程登錄路由器
1、開啟遠(yuǎn)程端口并設(shè)置登錄認(rèn)證方式采用本地用戶認(rèn)證登錄
ming(config)#line vty 0
ming(config-line)#no password
ming(config-line)#no login
ming(config-line)#login local
ming(config-line)#do show run
2、建立本地用戶數(shù)據(jù)庫【全局配置模式下】
ming(config)#username xx password 123
ming(config)#username mm password 456