iis服务器助手广告广告
返回顶部
首页 > 资讯 > 操作系统 >Linux 操作系统配置互信认证后,登录仍然需要输入用户密码的解决办法
  • 504
分享到

Linux 操作系统配置互信认证后,登录仍然需要输入用户密码的解决办法

2023-06-05 15:06:08 504人浏览 独家记忆
摘要

近日,在安装GreenPlum数据库的测式环境,在安装过程中需要配置节点间的互信认证,但是我却收到了错误提示:Permission denied (publickey,passWord,keyboard-interact

近日,在安装GreenPlum数据库的测式环境,在安装过程中需要配置节点间的互信认证,但是我却收到了错误提示:

Permission denied (publickey,passWord,keyboard-interactive).

从提示信息上看可能是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,配置文件没有问题

检查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

检查结果:软件包也没有问题

检查防火墙和Selinux是否关闭

[root@ora11g ~]# service iptables statusiptables: Firewall is not running.[root@ora11g ~]# [root@ora11g ~]# [root@ora11g ~]# [root@ora11g ~]# getenforceDisabled[root@ora11g ~]#

检查结果:全部关闭

检查SSH互信的配置文件

我的环境确认都是正确的

检查相关文件夹的权限

我的用户为gpadmin,因此我检查/home/gpadmin的文件夹权限

gpadmin文件夹的权限为 747,比较奇怪的权限,如下图所示:

Linux 操作系统配置互信认证后,登录仍然需要输入用户密码的解决办法

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

Linux 操作系统配置互信认证后,登录仍然需要输入用户密码的解决办法

检查/home/gpadmin/.ssh下文件的权限,下图的权限都是正确的权限

Linux 操作系统配置互信认证后,登录仍然需要输入用户密码的解决办法

经过权限的修改解决了主机间的互信认证问题,但是我一直不明白为什么文件夹权限与SSH互信认正有关,也许这就需要检看相关源代码了。

--结束END--

本文标题: Linux 操作系统配置互信认证后,登录仍然需要输入用户密码的解决办法

本文链接: https://www.lsjlt.com/news/243523.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作