通过ssh-copy-id root@.... 后还是一直需要密码登录的,查了
grep PubkeyAuthentication /etc/ssh/sshd_config
PubkeyAuthentication yes
grep AuthorizedKeysFile /etc/ssh/sshd_config
AuthorizedKeysFile .ssh/authorized_keys # .ssh/authorized_keys2
都有,但还是一直到要密码:
后面AI了一下,找到一个解决问题,就是root目录的权限重定配置后就可以正常免密登录了
chmod 700 /root