0

I have server A and Server B.

Iam able to ssh from server A to server B as 'root' user password less successfully. I have another non-root normal user in server B, My requirement is to ssh from server A to Server B using that non-root normal user.

Here is what I did; 1) Copied the public key from Server A to Server B's non-root normal user authorized_keys files kept in .ssh directory of non-root normal user. 2)On Server B, given the permissions 700 to .ssh directory and given 600 permissions to authorized_keys file.

It is still asking for password, it is not working as expected(passwordless).

Please help.

FYI, root user login from Server A to Server B is working perfectly passwordless and I followed the above steps only. Surprised to see it is not working for a normal user.

4

2 回答 2

0

我可以使用以下命令解决此问题;

restorecon -R -v /home/

我现在能够成功地为非 root 用户进行基于密钥的身份验证

于 2017-11-28T06:21:55.890 回答
0

在服务器 B 上,其他用户的 .ssh 目录权限为 755 ,而 authorized_keys 为 644 。这应该工作

于 2021-05-24T07:32:48.357 回答