-
Create 2 instances (one in pub, one in private), and attach them to SG (public_sg, private_sg) in sequence.
-
Connect to your public EC2 from your local server
marwantukhta@Marwans-MacBook-Pro downloads % ssh "key.pem" [email protected]
The authenticity of host '54.209.7.113 (54.209.7.113)' can't be established.
ED25519 key fingerprint is SHA256:RiztU2v/Vjp3ToVYb6ZtkO3c1LDUs0IuCv1(7KK7Z+wM. This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '54.209.7.113' (ED25519) to the list of known hosts.
__I_ ) _1 ( / Amazon Linux 2 AMI ___1\___1___1
https://aws.amazon.com/amazon-linux-2/
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
[ec2-user@ip-192-168-74-192 ~]$
- Connect to private server from public server
[ec2-user@ip-192-168-74-192 ~]$ [email protected]
__I_ ) _1 ( / Amazon Linux 2 AMI ___1\___1___1
https://aws.amazon.com/amazon-linux-2/
[ec2-user@ip-192-168-128-188 ~]$