SDG
SDG

Reputation: 2342

Trying to use PuttyGen on Mac

I currently have a school project where I have to start a VM using vagrant and virtual box. It asks me to use Putty, which is pretty much avoidable in mac using the terminal itself. However, I reach the point where I am supposed to use Puttygen. The exact instructions are:

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

Now the problem is that there isn't PuttyGen on OSX. This question addresses the problem.

To start with I ssh'ed with the privatekey located in the file itself, by invoking ssh -i private_key [email protected] -p 2222:

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

I am not sure as to if this worked. How can I save the private key? So I proceeded to try puttygen privatekey -O private-openssh -o privatekey.pem and I got:

puttygen: unable to load file `privatekey': unable to open file 

What am I supposed to do here?

Upvotes: 0

Views: 3577

Answers (1)

vandanak
vandanak

Reputation: 1182

Try inputting puttygen .vagrant/machines/default/virtualbox/private_key -o putty_key in the terminal to save the private key.

Upvotes: 1

Related Questions