service xinted status
没有安装
 
rpm -ivh 按照顺序安装以下三个包
xinetd-2.3.14-34.el6.x86_64.rpm
telnet-server-0.17-47.el6.x86_64.rpm
telnet-0.17-47.el6.x86_64.rpm
 
开启服务
service xinetd start
 
解除禁用
[root@RHEL6 /etc/xinetd.d]$cat /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet 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 
}
 
查看进程
[jxd@RHEL6 /home/jxd]$ps -ef |grep xinetd |grep -v grep
root      5443     1  0 23:35 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
此时已经可以用普通用户telnet
 
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel 2.6.32-279.el6.x86_64 on an x86_64
login: jxd
Password: 
Last login: Thu Mar 14 23:36:44 from 192.168.0.2
#vi /etc/motd   (Message of today)
 
Welcome to  Linux RHEL6.2 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
Installed on 2013-03-14
For Linux test server
By  jxd
If any question please mail to jiangxundong@qq.com
 
默认不允许root通过telnet登录的,下面是修改方法
vi /etc/pam.d/login
auth require pam_securetty.so
修改为
#auth require pam_securetty.so
或mv /etc/securetty /etc/securetty.bak
 
重启服务
[root@RHEL6 /root]$service xinetd restart
Stopping xinetd: [  OK  ]
Starting xinetd: [  OK  ]
[root@RHEL6 /root]$service xinetd status
xinetd (pid  6157) is running...
 
测试
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel 2.6.32-279.el6.x86_64 on an x86_64
login: root
Password: 
Last login: Fri Mar 15 00:04:17 from 192.168.0.2
#vi /etc/motd   (Message of today)
 
Welcome to  Linux RHEL6.2 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
Installed on 2013-03-14
For Linux test server
 
 
看服务
[root@RHEL6 /root]$chkconfig --list |grep xinetd
xinetd          0:off   1:off   2:on    3:on    4:on    5:on    6:off 
 
此类连接方式为明文传输,故一般生产用ssh
 
ssh允许root登录;拒绝就填no
[root@RHEL6 /root]$grep PermitRootLogin   /etc/ssh/sshd_config
#PermitRootLogin yes
 
 
关闭
[root@RHEL6 /root]$chkconfig xinetd off
[root@RHEL6 /root]$chkconfig --list |grep xinetd
xinetd          0:off   1:off   2:off   3:off   4:off   5:off   6:off