致命:PAM 帐户配置拒绝用户 Golden 的访问

致命:PAM 帐户配置拒绝用户 Golden 的访问

我正在尝试设置从“machineA”到“machineB”的无密码 ssh,但不知何故它不起作用,并且出现以下错误。我已经将 jenkins 用户的公钥从“machineA”添加到“machineB”黄金用户的“authorized_keys”文件中。

jenkins@machineA:~$ ssh golden@machineB
Connection to machineB closed by remote host.
Connection to machineB closed.

我登录到这个“machineB”并检查了“auth.log”文件,我看到以下错误:

Feb 13 14:29:49 machineB sshd[22145]: rexec line 90: Deprecated option RhostsAuthentication
Feb 13 14:29:50 machineB sshd[22145]: pam_access(sshd:account): access denied for user `golden' from `machineA'
Feb 13 14:29:50 machineB sshd[22145]: fatal: Access denied for user golden by PAM account configuration [preauth]

下面是我的权限在 machineB 上的设置方式:

golden@machineB:~$ ls -lrtha
total 56K
-rw-------  1 golden golden  675 Oct  6 21:39 .profile
-rw-------  1 golden golden 3.6K Oct  6 21:39 .bashrc
-rw-------  1 golden golden  220 Oct  6 21:39 .bash_logout
drwx------  3 golden golden 4.0K Oct  7 12:03 .config
drwxr-xr-x 13 root     root     4.0K Oct 19 18:41 ..
-rw-------  1 golden golden  12K Feb 13 13:54 .bash_history
-rw-------  1 golden golden  11K Feb 13 14:10 .viminfo
drwx------  2 golden golden 4.0K Feb 13 14:10 .ssh
drwx------  4 golden golden 4.0K Feb 13 14:10 .

golden@machineB:~$ ls -lrtha .ssh/
total 24K
-rw------- 1 golden golden 1.7K Oct 19 22:46 id_rsa
-rw-r--r-- 1 golden golden  381 Oct 19 22:46 id_rsa.pub
-rw-r--r-- 1 golden golden 2.2K Oct 19 22:48 known_hosts
-rw-r--r-- 1 golden golden 1.2K Feb 13 14:10 authorized_keys
drwx------ 4 golden golden 4.0K Feb 13 14:10 ..
drwx------ 2 golden golden 4.0K Feb 13 14:10 .

这是我/etc/security/access.conf在 machineB 上的文件:

+:ALL:LOCAL
+:root:ALL
+:tom:ALL
# generated by puppet
# beginldap
+:@golden:ALL
+:@opers:ALL
+:@unixcore:ALL
+:stack:ALL
+:comet:ALL
# endldap
-:ALL:ALL

我正在使用以下权限:

chmod 700 ~/.ssh
chmod 644 ~/.ssh/authorized_keys

我在这里做错了什么?

相关内容