Skip to content

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

Pre-requisites

Step by step

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 !