linux telnet 无法登陆解决过程

1.安装telnet 服务

[root@localhost Server]# rpm -ivh telnet-server-0.17-39.el5.x86_64.rpm
warning: telnet-server-0.17-39.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:telnet-server          ########################################### [100%]
[root@localhost Server]# service xinetd restart
Stopping xinetd: [  OK  ]
Starting xinetd: [  OK  ]

2.取消禁用
[root@localhost Server]# vi /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
}


~
~
~
"/etc/xinetd.d/telnet" 14L, 304C written

 

3.重启telnet

[root@localhost Server]# service xinetd restart
Stopping xinetd: [  OK  ]
Starting xinetd: [  OK  ]
[root@localhost Server]#

/*******

如果还不能登陆,有可能是防火墙问题,

防火墙关闭:

/etc/init.d/iptables stop

禁止防火墙在系统启动时启动

/sbin/chkconfig --level 2345 iptables off

******/

 

4.取消root禁用,保证root用户能够登陆:

 

[root@localhost ~]# mv /etc/securetty /etc/securetty.bak

重命名或删除上面的文件即可,

 

网上还建议注释掉/etc/pam.d/login中的

auth required /lib/security/pam_security.so

我未做修改,这个文件的内容如下:

[root@localhost ~]# more /etc/pam.d/login
#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    optional     pam_keyinit.so force revoke
session    required     pam_loginuid.so
session    include      system-auth
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the
user context
session    required     pam_selinux.so open


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值