路由器遠程管理的配置命令(網件路由器遠程管理如何設置)

一、路由器配置:【同一廠家路由器的配置模式的基本命令跟交換機一樣,命令見前面的文章】
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【路由器端口默認是down,需要人工開啟】
————————————————
二、開啟路由器的遠程控制設置登錄密碼:
方式一:設置密碼登錄遠程訪問【全局配置模式下進行配置】
Router(config)# line vty 0 4 【進入虛擬端口即遠程端口】
Router(config-line)#password 123 【設置遠程登錄密碼(默認是telnet)】
Router(config-line)#login 【開啟登錄認證】
Router(config-line)#exit
Router(config)#
————————————————
默認是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方式登錄
設置ssh登錄的密碼需要【全局模式下】配置安全秘鑰:
Router(config)#hostname ming 【設置路由名稱】
ming(config)#ip domain-name r1.qf.com 【設置域名】
ming(config)#crypto key generate rsa【生產密鑰對】
----------- -------- -----
ming(config)#line vty 0
ming(config-line)#transport input ssh【設置登錄方式為ssh】
ming(config-line)#password 123456【設置ssh登錄密碼】
ming(config-line)#login【開啟登錄認證】
Router(config-line)#exit
Router(config)#
方式三:設置用本地賬戶遠程登錄路由器
1、開啟遠程端口并設置登錄認證方式采用本地用戶認證登錄
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、建立本地用戶數據庫【全局配置模式下】
ming(config)#username xx password 123
ming(config)#username mm password 456