我有一台运行正常的Windows计算机,但在Mac OS X Sierra 10.13.5上,出现此错误Permission denied (publickey)
需要重新开始的步骤:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOZoANykFA4ta2ft4wSS9Hqsvi+b8r3XDaUlBSPRyPzwXXXXX≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈XXXXXaWfO3X9SEFtE7Qe8NxXjmkgC4BYZSg4QFRV2Is5PiUn5MXs4StmNzZGcj8kFQd4PG0go1FqAsixT myname@apples-mbp
我仍然收到错误
root@128.261.64.32: Permission denied (publickey)
我是否缺少本地设置?
答案 0 :(得分:0)
确保可以在sshd中禁用用于root用户或root用户的密钥。有关详细信息,请参阅this。可能会对您有帮助。
答案 1 :(得分:0)
谢谢你,
我错过了将authorized_keys添加到服务器的步骤。这样就解决了:
https://www.digitalocean.com/community/questions/how-do-i-add-an-ssh-key-to-an-existing-droplet
cat〜/ .ssh / id_rsa.pub | ssh user@123.45.56.78“ mkdir -p〜/ .ssh && cat >>〜/ .ssh / authorized_keys”