win配置(启用客户端连接)
控制面板==》程序==》程序和功能==》启用或关闭Windows功能==》勾选Telnet Client(Telnet客户端)==》确定
Linux配置(CentOS7.0)
- 大多数Linux是没有安装Telnet服务的,我们要先安装Telnet服务
安装(root权限下)
- 安装xinetd服务(托管服务。又名:超级守护进程)
yum install xinetd
- 安装 telnet-server 服务
yum install telnet-server
安装过程可能遇见的问题
- another app is currently holding the yum lock;waiting for it to exit
解决
// 用此命令关掉强制关掉已在运行的yum进程
rm -f /var/run/yum.pid
启动
systemctl start telnet.socket
systemctl start xinetd
接下来就是连接了
- ifconfig查看IP信息
- 在WIndows输入(win+R)组合键弹出的运行框中输入cmd接在弹出的命令解释器框中输入命令telnet 192.168.153.10 (这里的IP地址是经过上一步查到的每个人可能不一样)
在这一步的时候我遇到一个问题:Linux能ping通主机但是主机不能ping通Linux
解决办法:虚拟机的网络编辑器中配置必须和Windows中网络适配器的配置在同一个网段(如下图)
参考:
https://blog.csdn.net/plokday/article/details/80490285
https://jingyan.baidu.com/article/8cdccae97b712a315413cd8c.html
https://blog.csdn.net/qqxyy99/article/details/80864862
https://blog.csdn.net/u011781521/article/details/52950254