I recently got myself a chromebook and i am eager to write how it feels from a development standpoint but first a little guide on how to connect to your AWS EC2 instance.
There are two ways to do it:

###Setting up your keys

When you create a new EC2 instance, AWS will provide you with a key.pem file containing your private key which you use to ssh to your instance.

If you have your chromebook in developer mode you can open crosh, you could also install the crosh window extension for a nice terminal window instead of a new chrome tab.
If you don’t, just use a 3rd machine and then move the files over.

First change the file permissions, it’s your private key and should remain private!

  chmod 400 mykey.pem

Then let’s generate a public key

  ssh-keygen -y -f mykey.pem > mykey.pub

Then make a copy of your private key without an extension

  cp mykey.pem > mykey

Keep mykey.pem stored and private, we will use mykey.pub and mykey to connect.

###Connecting

  • Open the secure shell extension, give it a connection name.
  • For the username, i was running an ubuntu instance so the default username was just “ubuntu”.
  • For the hostname, use the public dns found on instance details, something like
    “ec2-xx-xx-xxx-xxx.eu-central-1.compute.amazonaws.com” or the instance’s IP.
  • Now for our keys, click import and get both files(mykey, mykey.pub) in one go(with ctrl),
    the name should appear in the list, select it, click connect and you are off!

###Extra notes

There used to be a ssh command in crosh but it has been removed and now points you at the extension.
If you want a more traditional ssh workflow you can install crouton(if you are on dev mode) and just connect like you would normally do(more on crouton in another post).

Have fun!