我正在使用厨师 Vagrant 。当我运行 vagrant 时。它在提示输入密码之后创建一个实例。实际上它应该使用 ssh key 登录
我已授予
chmod 0700 ~/.ssh/.ssh
chmod 0600 ~/.ssh/.ssh/authorized_keys
root@system-desktop:/home/system/Documents/dsrv169# vagrant --version
Vagrant 1.6.5
config.vm.provider :digital_ocean do |provider, override|
override.ssh.private_key_path = '~/.ssh/id_rsa'
override.vm.box = 'digital_ocean'
root@system-desktop:/home/system/Documents/dsrv168# vagrant ssh-config
Host default
HostName 45.55.239.147
User root
Port 22
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /root/.ssh/id_rsa
IdentitiesOnly yes
LogLevel FATAL
我可以知道我需要做什么吗
最佳答案
这只是所有者和组权限问题。发出 chown 后,它工作正常。
关于ssh - Vagrant 在不使用 key 的情况下提示输入密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29935270/