0

i have stuck at Xshell6 where i am trying to connect Aws EC2 Ubuntu instance. I have upload .pem key in User key Manager, prompt new session, putted Name, Hostname, Protocol as 22. In authentication, using public key as method, username as ec2-user and picking public key (.pem file)

Still it is asking passphrase. Can someone help how to connect Amazon EC2 instance by using passphrase ?

Saurabh Gupta
  • 13
  • 1
  • 6
  • Can you try ssh with sudo like `sudo ssh -i /home/test.pem ubuntu@host` ? – Prabhakar Reddy Dec 05 '19 at 05:17
  • ``ssh -i "awscav.pem" ubuntu@ec2-13-232-160-30.ap-south-1.compute.amazonaws.com`` ``Host 'ec2-13-232-160-30.ap-south-1.compute.amazonaws.com' resolved to 13.232.160.30.`` ``Connecting to 13.232.160.30:22...`` Connection established. To escape to local shell, press 'Ctrl+Alt+]'. Connection closing...Socket close. Connection closed by foreign host. ``Disconnected from remote host(ec2-13-232-160-30.ap-south-1.compute.amazonaws.com:22) at 10:49:32.`` – Saurabh Gupta Dec 05 '19 at 05:20
  • By any chance did you modified /etc/ssh/sshd_config ? – Prabhakar Reddy Dec 05 '19 at 05:26
  • Not yet, first thing i have launched ``EC2`` from ``AWS`` Console and connecting through ``Xshell6``. – Saurabh Gupta Dec 05 '19 at 05:29

1 Answers1

0

Username for AWS Ubuntu instance is ubuntu, you are using username as ec2-user which is for the Amazon Linux AMI.

So, put the user as ubuntu and you'll get logged in.

DigiGoon
  • 26
  • 6