windows - SSH 到 Windows 中的 Vagrant box?

标签 windows ssh virtual-machine virtualbox vagrant

我正在使用 Vagrant 在 Windows 中启动 VirtualBox 虚拟机。 在其他平台,我可以

$ vagrant ssh

连接到虚拟机。

我如何连接到 Windows 中的这个 Vagrant 盒子?

Vagrant 文档中建议的使用 PuTTy 的方法也不起作用:

http://docs-v1.vagrantup.com/v1/docs/getting-started/ssh.html

最佳答案

我使用 PuTTY 连接到 Windows7 上的 Vagrant 盒子。

确保你

  • 使用 PuTTYGen%USERPROFILE%\.vagrant.d\insecure_private_key 转换为 .ppk|
  • 在您的 PuTTY session 中使用 .ppk key - 在 Connection > SSH > Auth > Private key file 中配置
  • 使用主机 127.0.0.1
  • 使用端口 2222 而不是 22
  • 您可以在Connection > SSH > Auth > Private key for authentication 下设置默认用户名(vagrant)

关于windows - SSH 到 Windows 中的 Vagrant box?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9885108/

相关文章:

php - 更好的工具来管理 git merge 冲突 ssh 和 windows

ubuntu - 警告 : remote connection disconnect, 连接到 169.254.169.254 超时

windows - 如何使用 Windows 7 打开 .vhdx?

macos - 访问虚拟机中的本地站点(vmware fusion、virtualbox 等)

c++ - LoadLibrary 失败并出现错误 203 : The system could not find the environment option that was entered

windows - MSB3481 证书错误

c++ - 驱动程序拒绝访问 PCI 卡

linux - 如何使用 ssh 和 Travis CI 进行自定义部署?

linux - 如何在 Linux 中使用 awk 启用统计功能

windows - python : How to pass non-ASCII file names to Popen on Windows?