-
Notifications
You must be signed in to change notification settings - Fork 0
Connect to a Linux EC2 instance in SSH mode from another instance with command line
Marc Grossouvre edited this page Oct 11, 2019
·
6 revisions
- You must be connected to an existing EC2 instance (call it A) in SSH mode (see Connect to an EC2 instance in SSH mode with PuTTY)
- You must have uploaded your private key file on A and secured it restricting access (see Upload files to a Linux EC2 instance and protect restrict access to yourself using FileZilla)
AWS gives you the proper command line, use it !
-
On your AWS console, go to EC2 Dashboard -> Instances
-
Click the instance you want to reach (call it B)
-
Click the Connect button above
-
Copy the code example which should look like :
`ssh -i "myKeyPair2.pem" ec2-user@B_private_IP`
-
Go to your command line console and paste the code (right click usually)
-
Enter !