Alan Jebakumar
Alan Jebakumar

Reputation: 317

Unable to ssh to the aws Amazon Unix session

I created an instance of aws-Amazon Linux on my vpc and when i tried to connect(ssh) to it from my windows instance, i get the below error-

---------------------------
PuTTY Fatal Error
---------------------------
Disconnected: No supported authentication methods available (server sent: publickey)
---------------------------
OK   
---------------------------

I used the below syntax to connect to my instance-

"c:\Program Files\Putty\PUTTY.EXE" -ssh [email protected] -i c:\Shared\mykey1.pem

Do suggest on how this can be fixed.

Upvotes: 0

Views: 61

Answers (1)

Noelkd
Noelkd

Reputation: 7906

You need to convert the key into a format putty can use:

  1. Start PuttyGen
  2. Under Type of key to generate, select SSH-2 RSA.
  3. Click Load. By default, PuTTYgen displays only files with the extension .ppk. To locate your .pem file, select the option to display files of all types
  4. Select your .pem file for the key pair that you specified when you launch your instance, and then click Open. Click OK to dismiss the confirmation dialog box
  5. Click Save private key to save the key in the format that PuTTY can use. PuTTYgen displays a warning about saving the key without a passphrase. Click Yes.
  6. Specify the same name for the key that you used for the key pair (for example, my-key-pair). PuTTY automatically adds the .ppk file extension.

Here is the documentation.

Upvotes: 1

Related Questions