Ø 远程登录条件:
a. 被登录方开启远程登录功能
b. 双方能够相互通信
Ø Telnet 远程登录 (采用明文加密、不推荐)
○ 步骤如下
§ R1作为登录方 192.168.10.1
§ R2作为被登录方 192.168.10.254
1) R1配置IP地址打开端口:
Router>en
Router#conf
R(config)#hostname R1
R1(config)#int g0/0
R1(config-if)#no shutdown
R1(config-if)#ip add 192.168.10.1 255.255.255.0
2) R2配置IP地址、打开端口:
Router(config)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip add 192.168.10.254 255.255.255.0
3) R2配置Telent:
Router(config-if)#line vty 0 4 //进入vty线路 允许5个用户远程登录
Router(config-line)#password 123456 //设置远程登陆密码
Router(config-line)#login
Router(config-line)#transport input telent //开启telnet
4) R1ping R2 //保证双方能够互相通信
R1#ping 192.168.10.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.254, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms
5) R1 使用 Telnet远程登陆R2
R1#telnet 192.168.10.254
Trying 192.168.10.254 ...Open
User Access Verification
Password:
R2>en
% No password set. //要在R2设置进入特权模式密码
R2>en
Password:
R2#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#
[Connection to 192.168.10.254 closed by foreign host]
6) R2设置进入特权模式密码
R2(config)#enable password 123456