Connect to Your Instance Using SSH

After you have set up your keys locally, added your keys to Engine Yard Cloud, and installed the keys to your applications environment, you are now ready to connect to your instance(s) using an SSH client. This process has two steps:

  1. Get Amazon Hostname.
  2. Connect via terminal or SSH client. 

Getting Amazon Hostname

  1. Go to your dashboard.
  2. Click an environment you want to connect to.
  3. Click on the Copy PHA to clipboard option for the instance you want to connect to.

Connect via Terminal or SSH Client

Via Terminal

This method requires that the private keys you generated are located in the .ssh directory inside your home directory in OpenSSH format. If you generated the keys via CLI, this is the default location.

    1. Open the Terminal.

    2. SSH using your own amazon hostname and username deploy. For example:
      ssh deploy@ec2-123-123-123-123.compute-1.amazonaws.com 
    3. You will be prompted to confirm that you want to continue connecting. Enter yes.
    4. If prompted, enter the passphrase you have previously configured.

This method requires that the keys you generated are in the .ppk format. If you did not create the key pair using PuTTYgen, you need to convert the file using PuTTYgen before completing the steps below.

    1. Open PuTTY.
    2. In the category section, go to Connection > SSH > Auth.
    3. Click on the Browse... option for the Private key file for authentication field.
    4. Set the Files of type to All Files (*.*).
    5. Locate the private key, select it and click on Open.
    6. In the category section, go to Session.
    7. Enter your Amazon hostname in the Host Name field and click on Open.
    8. A PuTTY security alert will be displayed. Click on Yes.
    9. You will be prompted to enter the user you wish to log in as. Enter deploy
    10. When prompted, enter the passphrase you previously configured.
    1. From your dashboard, click on the environment you want to connect to.
    2. Locate the specific instance you want to access and click the SSH link.
    3. You should receive a prompt to launch an SSH client. Accept this prompt.

Outcome

You should now be connected to an instance via an SSH session.


If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.

Comments

  • Avatar
    Karlo Šmid

    I failed to connect using instructions on this page. I used passphrase during the creation of my public key.

    When I tried to established ssh connection I received following error:

    Agent admitted failure to sign using the key.

    Permission denied (publickey).

    Google pointed to the solution at this blog:

    http://www.railsknowledge.com/2012/08/agent-admitted-failure-to-sign-using.html

    You should do following:

    ssh-add ~/.ssh/id_rsa

     

    Regards, Karlo.

    0
    Comment actions Permalink
  • Avatar
    Piers Young

    Thanks Karlo - had the same problem.

    0
    Comment actions Permalink
  • Avatar
    Paul Thomas

    I was able to connect as follows from Windows 7...

    Opened a Git Bash shell using Start -> RailsInstaller -> Git Bash

    Then run 'exec ssh-agent bash'

    Then run 'ssh-add ~/.ssh/whatever_your_key_name_is'

    You will be asked to enter your pass phrase.

    Then you should see a message saying 'Identity added ....'

    Then run 'ssh deploy@ec2-123-45-678-9.compute-1.amazonaws.com' and I was connected.

     

    ps. can an admin delete my previous post which was actually wrong please!

    0
    Comment actions Permalink
  • Avatar
    Keri Meredith

    Paul, done. :)

    0
    Comment actions Permalink
  • Avatar
    Muhammad Rizal

    better using firefox pluggin called firessh to execute sshlink :)

    Trust me it's work 100% :D

    0
    Comment actions Permalink
  • Avatar
    Evan Machnic

    Muhammad,

    Thanks for the tip!

    Evan

    0
    Comment actions Permalink
  • Avatar
    Muhammad Rizal

    Evan

    My pleasure ;)

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk