Vagrant只允许第一次SSH到它

时间:2015-12-21 22:45:27

标签: ssh vagrant vagrantfile

我试图配置我的第一个Vagrant盒子。 但是,它允许我仅在vagrant ssh之后第一次使用vagrant up) 但是当我退出VM时,我无法重新登录它。

提供流动性提供收益率:

▶ vagrant provision
==> default: Running provisioner: shell...
SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.

尝试ssh进入它会产生:

▶ vagrant ssh       
vagrant@127.0.0.1's password:
vagrant@127.0.0.1's password:
vagrant@127.0.0.1's password: 
Permission denied (publickey,password).

即使我给它默认密码(vagrant),它也会拒绝它并再次要求它3次。

当我在GUI模式下启动时,在写完任何凭据后,整个控制台会清除并要求再次登录。

尝试销毁并重建虚拟机,清除project/.vagrant~/.vagrant.d。 总是一样的结果。

向Vagrantfile添加config.ssh.insert_key = false没有改变任何内容。

我的框是ubuntu/trusty64,我的ssh-config看起来像这样:

▶ vagrant ssh-config
Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /home/iraasta/.vagrant.d/insecure_private_key
  IdentitiesOnly yes
  LogLevel FATAL

尝试使用ssh vagrant@127.0.0.1 -p 2222和密码vagrant手动ssh也会返回权限被拒绝

0 个答案:

没有答案