Cloud Playgroundchevron_right Instant Terminalchevron_right

How-To: SSH into an Amazon EC2 Instance using an Instant Terminal

Because the Instant Terminal does not have access to your local downloads, using it to connect to an EC2 instance with a keypair is done a little differently. This article will cover how to add your keypair to the Instant Terminal session and connect to an EC2 instance. 

  • Click on the playground button at the top of your screen in the blue navigation bar.
  • Then, click on the tab labeled Instant Terminals
  • Click on Open SSH

Screenshot_2019-02-01_13.02.30.png

  • Run the command `add_key`
  • Open the keypair you downloaded directly from AWS inside a text editor. Do not use `putty` or `puttygen` if you're on a Windows computer.
  • Copy the entire file's text and paste them above the line in the instant terminal

Screenshot_2019-02-01_13.08.37.png

  • Press the ESC key on your keyboard, then type :wq
  • Now attempt to SSH to your EC2 using the command: ssh -i "keypairtest.pem" ec2-user@ec2-100-27-19-103.compute-1.amazonaws.com.
    • Note, the command will look different for your EC2 instance. You can find the correct SSH command for your instance by selecting Connect from the EC2 Instances section of the AWS Management Console. 

Screenshot_2019-02-01_13.13.02.png

  • Ignore the message about failing to load the keyfile. You should now be connected to your EC2 instance! 

 If you have any other questions or concerns please reach out to support by emailing support@linuxacademy.com.