SSH 到 Windows 中的 Vagrant 框? [英] SSH to Vagrant box in Windows?

查看:33
本文介绍了SSH 到 Windows 中的 Vagrant 框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm using Vagrant to start a VirtualBox VM in windows. In other platforms, I can just

$ vagrant ssh

连接到虚拟机.

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

How do i connect to this Vagrant box in windows?

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

The way suggested in Vagrant documentation to use PuTTy also did not work:

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

推荐答案

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

I use PuTTY to connect to my Vagrant boxes on Windows7.

确保你

  • 使用 PuTTYGen
  • 在您的 PuTTY 会话中使用 .ppk 密钥 - 在连接 > SSH > 身份验证 > 私钥文件中配置
  • 使用主机 127.0.0.1
  • 使用端口 2222 而不是 22
  • 您可以在 Connection > SSH > Auth > Private key for authentication 下设置默认用户名(vagrant)
  • convert the %USERPROFILE%\.vagrant.d\insecure_private_key to .ppk using PuTTYGen
  • use the .ppk key in your PuTTY session - configured in Connection > SSH > Auth > Private key file
  • use host 127.0.0.1
  • use port 2222 instead of 22
  • you can set the default username (vagrant) under Connection > SSH > Auth > Private key for authentication

这篇关于SSH 到 Windows 中的 Vagrant 框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆