AWS OpsWorks
User Guide (API Version 2013-02-18)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Using SSH to Communicate with an Instance

You can use SSH to log into any of your online instances. There are two basic approaches:

Using the MindTerm SSH Client

The simplest way to log into an instance is to use the MindTerm SSH client. The details depend on whether you are logged in as an IAM (AWS Identity and Access Management) user or are using your account's access and secret keys.

Note

You must have Java enabled in your browser to use the MindTerm client.

If you log in to AWS OpsWorks as an IAM user, before using the MindTerm client for the first time, you must configure AWS OpsWorks.

To use the MindTerm SSH client as an IAM user

  1. In your browser, navigate to your IAM account alias. For more information, see Managing User Permissions.

  2. Log in as the IAM user that will use the client.

  3. Create an SSH key pair for the user and give OpsWorks the public key. For details, see Setting an IAM User's Public SSH Key.

    Store the private key for later use.

  4. In the OpsWorks navigation pane, click Permissions. Select the SSH checkbox for the desired IAM user to grant the necessary permissions. If you want to allow the user to use sudo to elevate privileges—for example, to run agent CLI commands—check the sudo box as well.

    SSH and sudo permissions for users

Each online instance includes an ssh action that you can use to open an SSH link to the instance by using the MindTerm client.

To open an SSH link by using the MindTerm client

  1. Log in as the IAM user whose permissions you set in the previous procedure.

  2. On the Instances page, click ssh in the Actions column for the appropriate instance.

    ssh action on Instances page
  3. For Path to your private key, specify the location of the IAM user's private key, which must correspond to the public key from the previous procedure. Then click Launch Mindterm.

    Private key on SSH page
  4. Use the terminal window to run commands on the instance.

    Run commands on the instance

The procedure is similar for root users.

To open an SSH link using your access and secret keys

  1. Log in using your account's access and secret keys.

  2. Assign an Amazon EC2 SSH key to the instance. For more information, see Using a Third-Party Client with Amazon EC2 Key Pairs.

  3. On the Instances page, click ssh in the Actions column for the appropriate instance.

  4. For Path to your private key, specify the location of the private Amazon EC2 SSH key from Step 2. Then click Launch Mindterm.

  5. Use the terminal window to run commands on the instance.

Using a Third-Party Client with Amazon EC2 Key Pairs

When you create a stack, you can specify an Amazon EC2 SSH key that is associated by default with every instance in the stack.

Default SSH key list on Add stack page

The Default SSH key list shows your AWS account's Amazon EC2keys. You can do one of the following:

  • Select the appropriate key from the list.

  • Select Do not use a default SSH key to specify no key.

If you selected Do not use a default SSH key, or you want to override a stack's default key, you can specify a key when you create an instance.

Specifying an SSH key

To use an Amazon EC2 SSH key

  1. Obtain the instance's public DNS name from its details page.

  2. Provide the associated private key to your preferred SSH client.

  3. Enter one of the following host names, where DNSName is the instance's DNS name:

    • For Amazon Linux: ec2-user@DNSName

    • For Ubuntu: ubuntu@DNSName