I am new to AWS. I created a VPC and created 2 subnets (1 private and 1 public). Enabled the internet gateway and updated the Route table with internet gateway entries.
Then created 2 Linux EC2 Instances for the private subnet and public subnet and associated security groups accordingly i.e. for public instance (SSH and HTTP) and for private (SSH, HTTP, ICMP, HTTPS) inbound rules.
I am using putty as a windows user to ssh into my public instance using mypkv.ppk and successfully able to login into that. And i am successfully able to ping the private instance from this public instance using
command: ping private-ip-address
But I don't know how to ssh into this private instance through this public instance? I have tried the following command:
ssh ec2-user@private-ip-address -i mypvk.pem
ssh ec2-user@private-ip-address -i mypvk.ppk
where mypvk.pem and mypvk.ppk are files stored onto my public instance which are private keys given my AWS while creating EC2 instances.
This above command says:
Enter passphrase for key 'mypvk.pem':
Enter passphrase for key 'mypvk.ppk':
I don't know the passphrase or what does that mean and how to ssh into private instance? Any help would be appreciated.