路由器远程管理的配置命令(网件路由器远程管理如何设置)

小编:迷魂冰 更新时间:2022-08-08
路由器远程管理的配置命令(网件路由器远程管理如何设置)

一、路由器配置:【同一厂家路由器的配置模式的基本命令跟交换机一样,命令见前面的文章】

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