Tuesday, November 4, 2014

How to create an instance in WSO2 Internal IaaS (OpenStack) and establish a ssh session

Host OS: Mac OSX Yosemite
Instance OS: ubuntu 12.04

Login to WSO2 IaaS.

Step 1 - Generate key pair

Go to
Project -> Compute -> Access & Security -> Key Pairs.

Click on import key pair button.

As per the description shown above in the screenshot itself, generate a key pair by login in to the terminal of the host machine.

Suhans-MacBook-Pro:~ suhanr$ cd .ssh/
> ssh-keygen -t rsa -f cloud.key

Your cloud key pair will be generated.
You can view them on your ssh certificates folder.

Suhans-MacBook-Pro:~ suhanr$ cd .ssh/
Suhans-MacBook-Pro:.ssh suhanr$ ls

cloud.key cloud.key.pub github_rsa github_rsa.pub known_hosts

Copy the public key content.

> vi cloud.key.pub
ssh-rsa AAAAB3NzaC1yc2 <.....................> j6BVmklren3DauAOGFLsql8gcXGLmCJbnz+b83MnWIMHF343lIvpfeHentJbS60tCipY4fEcRv1aSYpfJ8VswI8MJgRmdP+2bJdKGr1gDvwIvI/q6F6uXoT0F suhanr@Suhans-MacBook-Pro.local

Paste it on the Public Key field (refer image above).
Give a name for the Key Pair Name at your convenience.

Press Import Key Pair button.

Now you can see your new key in the Key Pairs tab as shown below.

Step 2 - Launch instance by using the generated key pair

Go to the Instances tab.
Click on launch instance button.

Fill the basic information as follows.

In the Access & Security tab give the key pair you generated in Step 1.

Click Launch button.
It will take nearly 10 seconds to put the instance to the running state.

Step 3 - Connect to the instance via ssh

From the Instances tab find the ip of the created new instance (refer image above).

Go to terminal of the host machine.

Suhans-MacBook-Pro:~ suhanr$ cd .ssh/

Connect to the instance via following command.

> ssh -i cloud.key  ubuntu@

Suhans-MacBook-Pro:.ssh suhanr$ ssh -i cloud.key  ubuntu@
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-69-virtual x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed Nov  5 04:20:00 UTC 2014

  System load:  0.0               Processes:           59
  Usage of /:   20.7% of 3.94GB   Users logged in:     0
  Memory usage: 12%               IP address for eth0:
  Swap usage:   0%

  Graph this data and manage this system at:

  Get cloud support with Ubuntu Advantage Cloud Guest:

New release '14.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Last login: Tue Nov  4 11:15:56 2014 from

Let the party begin :)