这绝对是重复的,但我尽可能多地浏览了其他答案,我首先在数字海洋论坛上发布,我联系了 DO 支持,但我仍然无法访问我的服务器。
我试过:
ssh-keygen
并制作一个名为 id_rsa3 的密钥(id_rsa 有效,但已被占用)。通过复制/粘贴将创建时的 SSH 密钥添加到 DO 仪表板。这个方法没有奏效。我摧毁了水滴并重新开始。ssh-copy-id -i ~/.ssh/id_rsa3 root@MY-IP
。然后就做了ssh -v -i ~/.ssh/id_rsa3 root@MY-IP
测试。Permission denied (publickey).
我摧毁了水滴并重新开始。/etc/ssh/authorized_keys
并粘贴与我的本地密钥匹配的公钥。然后ssh -v -i ~/.ssh/id_rsa3 root@MY-IP
进行测试。不过,Permission denied (publickey).
消灭水滴,再试一次。Created a ~/.ssh/config
and tried to get the droplet to choose the correct key. Might be some syntax problems here. It runs the config, but does not get the correct key.
Host sinatra_app
HostName 206.***.***.*04
AddKeysToAgent yes
UseKeychain yes
User root
PubKeyAuthentication yes
IdentityFile ~/.ssh/id_rsa3
IdentitiesOnly yes
UPDATE:
Destroyed droplet and added new keys. It asks me for a PW even with SSH. If I changed the PasswordAuthentication no
it will then say Permission denied (publickey).
So this is where I am stuck now. With access but cannot remove PW.
我遇到了同样的问题,要解决它,您打开 digitalocean ,打开控制台(如在网络中)并使用您的 root 密码登录,
然后sudo nano /etc/ssh/sshd_config
将PasswordAuthentication从no更改为yes
保存并重新启动sudo service ssh restart
就这样。
归档时间: |
|
查看次数: |
6169 次 |
最近记录: |