您的位置:首页 > 运维架构 > Linux

linux telnet 无法登陆解决过程

2012-07-31 16:25 211 查看
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

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐