centos开通telnet登录

# 安装 telnet 避免 ssh 无法登录

yum -y install xinetd telnet telnet-server


# 允许 root 账号登陆

vi /etc/securetty


# 末尾添加两行

pts/0 
pts/1

# 添加防火墙端口

vi /etc/sysconfig/iptables 

-A INPUT -p tcp -m state --state NEW -m tcp --dport 23 -j ACCEPT

# 重启服务关闭 firewalld

systemctl restart iptables 
systemctl disable firewalld 
systemctl stop firewalld
# 注册服务

systemctl enable telnet.socket 
systemctl start telnet.socket 
systemctl enable xinetd 
systemctl start xinetd

干完以上之后,发现root账号怎么都登录不了,而且确认不是密码的问题

Password: 
Login incorrect

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

查看日志tail -f /var/log/secure发现了报的错误信息

Jun  4 20:28:28 localhost login: pam_succeed_if(remote:auth): requirement "uid >= 1000" not met by user "root"
Jun  4 20:28:30 localhost login: FAILED LOGIN 1 FROM localhost FOR root, Authentication failure
Jun  4 20:36:10 localhost login: pam_securetty(remote:auth): access denied: tty 'pts/2' is not secure !

猜测是不是pts/2没有加入权限,重复  vi /etc/securetty步骤,

把pts/2加入末尾,登录就成功了

转载于:https://my.oschina.net/yangertt2006/blog/1824131

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值