Bluemix VM Login using Putty

562 Views Asked by At

After creating a virtual machine in Bluemix, what is the process to access the VM via SSH?

Where are the credentials located?

What is login/pwd to be used? Is there a way to download the image?

It is confusing to find this and there is no clear documentation.

2

There are 2 best solutions below

2
On

I use the username "ibmcloud" and have the private ssh key file specified in "Connection / SSH / Auth / Private key file for authentication"

[Edit] more info: In Bluemix / Cloud Management Dashboard / Access & Security you can either 'Create Key Pair' or 'Import Key Pair'.

The 'Create Key Pair' dialog shows following info: Key pairs are ssh credentials which are injected into images when they are launched. Creating a new key pair registers the public key and downloads the private key (a .pem file). Protect and use the key as you would any normal ssh private key.

You can import a key pair which you have created yourself either with puttygen.exe or with ssh-keygen (for example on Linux: ssh-keygen -t rsa -f cloud.key)

In Putty you then specify the private key file in Connection / SSH / Auth. A Putty login looks then similar to below:

login as: ibmcloud
Authenticating with public key "rsa-key-20150511"
Passphrase for key "rsa-key-20150511":
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-24-generic x86_64)

I hope this helps.

[Edit #2] I've just created a new vm on Bluemix (horizon2.open.ibmcloud.com) and had trouble importing my 'puttygen generated' public key. The 'Import Public Key' dialog in Access & Security would not accept the public key.

I had to replace at the start

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20150511" 

with

ssh-rsa

and remove at the end

---- END SSH2 PUBLIC KEY ----

No modifications where required in the private key file (*.ppk).

0
On

As explained by Hubert Wagner. You need to have SSH product like Putty and PuTTygen. First thing you need to do is create the SSH private and public key. This is required when you create the bluemix VM. Check this link:- http://www.ng.bluemix.net/docs/starters/index-gentopic4.html#vms

PuTTygen will help you generate the Private and public key. https://www.digitalocean.com/community/tutorials/how-to-create-ssh-keys-with-putty-to-connect-to-a-vps

You will have to specify passphrase during this key generation . Once you create your VM and it is started.

Start Putty and then specify your connection details for ssh connection under Connection -> SSH -> AUTH , browse and specify the private key that was generated using PuTTygen.

Then click Open and you will be asked to login Enter ibmcloud and then it will ask you for the passphrase that you enter during key creation.

I hope this helps.

Thanks, Charles.