首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >尝试在Mac上使用PuttyGen

尝试在Mac上使用PuttyGen
EN

Stack Overflow用户
提问于 2017-09-01 22:15:26
回答 1查看 3.1K关注 0票数 0

目前,我有一个学校项目,必须使用vagrantvirtual box启动VM。它要求我使用Putty,这在使用terminal本身的mac中几乎是可以避免的。然而,我达到了我应该使用Puttygen的地步。具体说明如下:

代码语言:javascript
复制
13. Download PuTTYgen and open it.
14. Click on File -> Load Private Key
The file we are looking for is in the ~\trusty64\.vagrant\machines\default\virtualbox folder (which was automatically created when you installed and configured Vagrant).
Change the visibility to “All Files” and select private_key
Click OK, on the following success message.
15. Click “Save Private Key”, then click Yes in the pop-up window.
16. Save it in any directory for example ~/lucid32. Give it the following name: putty_key

现在的问题是没有PuttyGen on OSXThis问题解决了这个问题。

首先使用文件本身中的私钥进行ssh编辑,方法是调用ssh -i private_key vagrant@127.0.0.1 -p 2222

代码语言:javascript
复制
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-129-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Fri Sep  1 21:32:23 UTC 2017

  System load:  0.0               Processes:           74
  Usage of /:   3.6% of 39.34GB   Users logged in:     0
  Memory usage: 25%               IP address for eth0: 10.0.2.15
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.

New release '16.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Fri Sep  1 21:32:23 2017 from 10.0.2.2

我不确定这是否有效。我怎样才能保存私钥?于是我开始尝试puttygen privatekey -O private-openssh -o privatekey.pem,我得到了:

代码语言:javascript
复制
puttygen: unable to load file `privatekey': unable to open file 

我在这里该怎么做?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-09-01 22:26:38

尝试在终端中输入puttygen .vagrant/machines/default/virtualbox/private_key -o putty_key以保存私钥。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46008595

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档