Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's a fairly common thing that I want to fire up a clean EC2 instance of a particular version of Ubuntu (usually lucid or precise) and then SSH in to that instance once it's up.

I've got some Python code that I use to do it for projects (lp:pkgme-service, lp:lp-dev-utils), but I was wondering whether there's a command-line tool.

  • I tried ubuntu-ec2-run. It doesn't use a security group that opens up SSH, so I would have to do that manually.
share|improve this question

The cloud-utils Install cloud-utils package contains a tool called ubuntu-ec2-run that lets you fire up clean instances, I'm not sure on the ssh bit.

You can also do this with juju if you've got it configured with ec2 with:

juju deploy ubuntu
juju ssh ubuntu/0
share|improve this answer
ubuntu-ec2-run fires up the instance, but needs quite a lot of extra configuration to open up a port for SSH and set up a valid SSH key pair. (-g <existing-security-group> -k <name-of-keypair>) – jml Jun 19 '12 at 13:06
Configuring Juju with ec2 took a while. The ubuntu charm is currently broken but I fetched it with bzr branch lp:charms/ubuntu and used the local repository option to deploy it. After juju reports a successful deployment, I had to wait a while (about two minutes) before I could see a public IP in juju status. Even then, juju ssh ubuntu doesn't work. I had to type juju ssh ubuntu/0. – jml Jun 19 '12 at 13:20
"juju ssh ubuntu" won't work, since "ubuntu" is the service, which could consist of multiple units (machines). – Marius K Mar 14 '13 at 21:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.