0

I am very new to linux. recently installed ubuntu 20 and i use ubuntu for the past 1 week. i created an instance(EC2) in AWS and try to connect via puTTy from my ternminal. get a fatal error. i converted .pem to .ppk and chmod to 400. i cant able to connect. but from the windows i can able to connect without any issue. can any one help me to solve this problem pls?

sudo apt update
----
ssh -V  
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f  31 Mar 2020
-----
putty --version
PuTTY: Release 0.73
Build platform: 64-bit Unix (GTK + X11)
Compiler: gcc 9.3.0
Compiled against GTK version 3.24.14
----
lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
1
  • What was the error message? If you've got "No supported auth method available" then you didn't tell PuTTY to use your privkey. (which you ahve to do)
    – Thomas Ward
    Dec 5, 2020 at 20:19

1 Answer 1

1

Welcome to Linux :-)

Firstly make sure you always download the keys when the AWS console offers - there is no chance to get them again! :-)

Once you have the private key, from the Linux command line you can connect directly using the Linux ssh client. Don't forget the username! The default on ec2 is "ec2-user"

ssh -i MyKey.pem [email protected]

For Putty on Linux, you need to use PuttyGen to convert the key:

puttygen MyKey.pem -o MyKey.ppk

Then in Putty create your session for the host you wish to connect to. I usually create the hostname as "ec2-user@IPAddress". Then in the Connection->SSH->Auth menu load your key for that session. Hit connect it will log you in to the EC2 instance.

1
  • i can able to connect via ssh client (ssh -i /path/key.pem [email protected]). works fine. but i do not know where is the error in putty. i follow the same method you said.
    – Olikhvar
    Dec 6, 2020 at 21:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .