小编典典

SSH 到 Windows 中的 Vagrant 框?

all

我正在使用 Vagrant 在 Windows 中启动 VirtualBox VM。在其他平台上,我可以

$ vagrant ssh

连接到虚拟机。

我如何在 Windows 中连接到这个 Vagrant 框?

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

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


阅读 54

收藏
2022-08-27

共1个答案

小编典典

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

确保你

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