Unable to connect using PuTTY ssh

putty

I'm on a Windows 7 machine and have installed PuTTY. I'm trying to connect, but the authentication fails because of an incorrect password. But, the VM I'm connecting to doesn't have a password?

Here are the creds I'm trying to use:
Host: 127.0.0.1
Port: 2222
Username: vagrant
Private key: c:/users//.vagrant.d/insecure_private_key

When I open PuTTY, I put in the above credentials and click open, at which point it ask for the username and I enter 'vagrant', then it asks for the password, but there isn't a password, so I get access denied?

Not sure how to get around this?

Thanks.

Best Answer

The first thing you need is a key that PuTTY can understand. PuTTY requires a .ppk file, which is not the same as the standard openSSH key file. You can use the PuTTYgen tool to generate a key or to convert an existing openSSH to a putty key.

Once you have a key, you need to tell PuTTY about it. For this you have two options:

Once you have PuTTY all setup, you need to make sure you have added your public key to the authorized_keys file. Once that is all setup you should be able to connect.

Related Question