- ssh root@127.0.0.1 -p 2222
- root@127.0.0.1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
解决办法:允许ssh 通过密码登录
修改配置文件 /etc/ssh/sshd_config
-
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
- systemctl restart sshd
即可解决