我已经以 root 和用户身份使用 ssh-copy-id 公钥。
以 root 身份登录时一切正常:
ssh [email protected]
Last login: Mon Oct 17 08:55:56 2022 from cn-l-200101316
[root@lab ~]#
但当我以用户身份登录时,服务器仍然要求输入密码。
ssh [email protected]
[email protected]'s password:
但是,我在 sshd 调试模式下不需要密码。
我不认为这是一个权限问题。顺便说一句,我设置了PubkeyAuthentication yes
和。#AuthorizedKeysFile .ssh/authorized_keys
/etc/ssh/sshd_config