Linux 操作系统配置互信认证后,登录仍然需要输入用户密码的解决办法
发表于:2026-10-31 作者:千家信息网编辑
千家信息网最后更新 2026年10月31日,近日,在安装GreenPlum数据库的测式环境,在安装过程中需要配置节点间的互信认证,但是我却收到了错误提示:Permission denied (publickey,password,keyboar
千家信息网最后更新 2026年10月31日Linux 操作系统配置互信认证后,登录仍然需要输入用户密码的解决办法
近日,在安装GreenPlum数据库的测式环境,在安装过程中需要配置节点间的互信认证,但是我却收到了错误提示:
Permission denied (publickey,password,keyboard-interactive).
1、从提示信息上看可能是SSH认证方式出现问题,于是检查SSH的配置文件
检查以下3个参数是否为 yes
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication yes
[root@ora11g ~]# cat /etc/ssh/sshd_config | grep -i aut#SyslogFacility AUTHSyslogFacility AUTHPRIV# Authentication:#MaxAuthTries 6#RSAAuthentication yes#PubkeyAuthentication yes#AuthorizedKeysFile .ssh/authorized_keys#AuthorizedKeysCommand none#AuthorizedKeysCommandRunAs nobody#RhostsRSAAuthentication no#HostbasedAuthentication no# RhostsRSAAuthentication and HostbasedAuthentication#PasswordAuthentication yesPasswordAuthentication yes#ChallengeResponseAuthentication yesChallengeResponseAuthentication no#KerberosAuthentication noGSSAPIAuthentication no# Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and# PasswordAuthentication. Depending on your PAM configuration,# PAM authentication via ChallengeResponseAuthentication may bypass# PAM authentication, then enable this but set PasswordAuthentication# and ChallengeResponseAuthentication to 'no'.
检查结果:三个参数的默认值都为 yes,配置文件没有问题
2、检查SSH所需要的软件包是否全部安装
[root@ora11g ~]# rpm -qa | grep sshopenssh-clients-5.3p1-122.el6.x86_64openssh-server-5.3p1-122.el6.x86_64openssh-askpass-5.3p1-122.el6.x86_64libssh3-1.4.2-2.el6_7.1.x86_64openssh-5.3p1-122.el6.x86_64
检查结果:软件包也没有问题
3、检查防火墙和Selinux是否关闭
[root@ora11g ~]# service iptables statusiptables: Firewall is not running.[root@ora11g ~]# [root@ora11g ~]# [root@ora11g ~]# [root@ora11g ~]# getenforceDisabled[root@ora11g ~]#
检查结果:全部关闭
4、检查SSH互信的配置文件
我的环境确认都是正确的
5、检查相关文件夹的权限
我的用户为gpadmin,因此我检查/home/gpadmin的文件夹权限
gpadmin文件夹的权限为 747,比较奇怪的权限,如下图所示:

我将权限修改为 750 ,如下图所示:

检查/home/gpadmin/.ssh下文件的权限,下图的权限都是正确的权限
经过权限的修改解决了主机间的互信认证问题,但是我一直不明白为什么文件夹权限与SSH互信认正有关,也许这就需要检看相关源代码了。
检查
权限
文件
配置
文件夹
问题
认证
结果
参数
环境
软件
软件包
提示
用户
三个
下图
主机
信息
数据
数据库
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
河南云网互联网络科技有限公司
科技互联网技术
壹账通互联网科技
上海致骋互联网科技
大白互联网科技
科技伦理 互联网公司
顺网科技2021年互联网排名
恒银科技与互联网金融
汽车互联网创新科技园
厦门比较好的科技互联网公司
和信科技工业互联网
卓翼科技产业互联网合作
电子商务与互联网科技的关系
产业互联网科技服务公司
互联网营销推广黑科技
领航科技大厦互联网公司
宁波跨境商互联网科技有限公司
求路客互联网科技电话
北京军民互联网科技公司
黑龙江互联网科技公司
天津市摩尔互联网科技
互联网电商科技
新华互联网科技学院
广州互联网络科技有限公司
菲比寻常互联网科技
互联网科技产业特征
辽宁互联网新科技
江苏苏星互联网科技有限公司
雨阳互联网卡科技有限公司
黑云互联网科技有限公司