3 Respuestas
- Más nuevo
- Más votos
- Más comentarios
0
Hi Yoplin,
I understand following is your setup:
- One EC2 instance is in private subnet on your AWS VPC.
- You want to SSH into this EC2 instance in private subnet.
Solution:
- Create a new EC2 instance in the public subnet. Lets call this instance as "EC2Public". This will have a public ip address.
- SSH into this EC2Public instance using putty.
- FTP the private key (.pem file) of your EC2 instance in private subnet (lets call this instance as EC2Private) on the EC2Public instance.
- Now from within this EC2Public instance terminal, you can use the SSH command to login to
EC2Private instance using the private ipaddress of EC2Instance private.
Following command can be used :
ssh -i <key location of .pem file> <username>@<privateIpOfEC2Instance>
5. You will be able to get connected to EC2Instance private instance.
6. In case you are getting error related to file permissions, execute following command on the .pem file
chmod 0400 <.pem file>
Hope this helps!
Thanks & Regards,
Prince Arora
respondido hace 4 años
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 3 años