CentOS 7.4安装telnet服务端

一、检查是否安装telnet

[root@Solin Solin]# rpm -qa | grep telnet 
[root@Solin Solin]# 

二、安装telnet客户端、服务端(如果已安装telnet则跳过此步骤)

yum -y install telnet*

三、检查是否安装xinetd

[root@Solin Solin]# rpm -qa | grep xinetd
[root@Solin Solin]# 

四、安装xinetd服务(如果已安装xinetd则跳过此步骤)

yum -y install xinetd

五、telnet服务安装之后,默认是不开启服务,修改文件/etc/xinetd.d/telnet来开启服务

注:第一次修改,此文件若不存在,可自己vim创建修改:修改 disable = yes 为 disable = no

[root@Solin xinetd.d]# pwd
/etc/xinetd.d
[root@Solin xinetd.d]# ls
chargen-dgram   daytime-stream  echo-dgram     time-dgram
chargen-stream  discard-dgram   echo-stream    time-stream
daytime-dgram   discard-stream  tcpmux-server
[root@Solin xinetd.d]# vim telnet
[root@Solin xinetd.d]# cat telnet 
# default: yes    
# description: The telnet server servestelnet sessions; it uses \   
# unencrypted username/password pairs for authentication.  
service telnet         
{  
  flags = REUSE  
  socket_type = stream  
  wait = no  
  user = root  
  server =/usr/sbin/in.telnetd  
  log_on_failure += USERID  
  disable = no   
}  

[root@Solin xinetd.d]# 

六、启动telnet和依赖的xinetd服务

[root@Solin xinetd.d]# systemctl restart xinetd.service
[root@Solin xinetd.d]# ps -ef | grep xinetd  #查看xinetd是否启动
root       6100      1  0 10:20 ?        00:00:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
root       6159   3770  0 10:21 pts/1    00:00:00 grep --color=auto xinetd
[root@Solin xinetd.d]# ps -ef | grep telnet  #查看telnet是否启动
root       6239   3770  0 10:22 pts/1    00:00:00 grep --color=auto telnet
[root@Solin xinetd.d]# 

七、测试telnet

在windows下打开cmd命令行窗口,输入telnet 192.168.1.10 回车,然后输入用户名密码。

八、设置服务开机启动

将xinetd服务加入开机自启动:systemctl enable xinetd.service

将telnet服务加入开机自启动:systemctl enable telnet.socket

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值