I’m trying to connect EC2 instance using ssh in kodekloud aws lab session but i do not have .pem (Private Key) for particular instance. Where exactly .pem file located in lab sessions?
EC2 instances are pre-configured with key pair by kode Kloud, I would like to know how to retrieve .pem file so that I can connect via ssh
Please post the link to a lab you are having issue with
The PEM file should be found in /home
directory
~ on ☁️ (us-east-1) ✖ ls -l /home
total 8
drwxr-xr-x 1 bob bob 4096 Apr 4 2023 bob
-r-------- 1 root root 1675 Jan 15 04:57 rdskeypair.pem
~ on ☁️ (us-east-1) ➜ ssh -i /home/rdskeypair.pem [email protected]
The authenticity of host '18.213.247.251 (18.213.247.251)' can't be established.
ECDSA key fingerprint is SHA256:gyhVxsOGPh+yi/zL35Vhdt2r8pLH6VyfVCOyAm+Pkq8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '18.213.247.251' (ECDSA) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_ Amazon Linux 2023
~~ \_#####\
~~ \###|
~~ \#/ ___ https://aws.amazon.com/linux/amazon-linux-2023
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
[ec2-user@ip-172-31-1-152 ~]$