Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Connect to Your Vagrant Virtual Machine with PuTTY
Note: These are old instructions for VVV 1, and will not work in VVV 2+. For the latest documentation see here
The Secure Shell ("SSH") protocol is all about security and Vagrant is prepackaged with an SSH key. Unfortunately, PuTTY is not compatible with OpenSSH, out-of-the-box. Consequently, PuTTY will not recognize the
insecure_private_key (which is in OpenSSH format) provided by Vagrant as a valid, private key.
The file is named
insecure_private_keyonly because it is not very private, in that it is publicly available, because it ships with Vagrant. You can regain the security offered by the SSH protocol by creating your own SSH key pair and editing the Vagrantfile, accordingly.
A workaround is to use PuTTYgen (a free, open-source RSA and DSA key generation utility) to import and convert the
insecure_private_key into PuTTY's format (a
.ppk file). To do so, simply:
- Run "vagrant ssh-config" in your Project Folder to locate where your Identityfile (public_key) is. Notice: $HOSTNAME $PORT $LOGINNAME
- Open the PuTTYgen utility;
- Click on the
- open the Identityfile (it doesn't have an extension and that's fine with PuTTYgen)
- Toward the bottom of the PuTTYgen dialog box, change the value in the
Number of bits in a generated key:field to
2048, RSA is fine
- Save the file (use a $NEW name and the .ppk extension).
Then, launch PuTTY and enter the following connection information:
|Connection/SSH||Auth||Private key file for authentication:||Click on the
|Session||Saved Sessions||vagrant (and then click the
Finally, click on the
Open button, at the bottom of the PuTTY window, to log in to your Vagrant VM.