Monday, February 22, 2016

Generating SSH Key DBAAS



With puttygen tool you can create your private, public, and open ssh keys for Cloud instances, here the procedure:

1.- Open tool

PuTTY Key Generator

2.- Select SSH-2 RSA

PuTTY Key Generator parameters

3- Bits:

PuTTY Key Generator parameters

4- Generate:
Generate button

5- Draw stg for randomness

Generating key - status

6.- Copy key

Generated public key

7.- Set the key pass phrase to create a private key

Key passphrase fields

There is no way to recover a passphrase if you forget it.



8.- Save it (PPK Extension)


9.- If you need to create a compatible SSH key for commands, export it as open ssh.

Save private key in OpenSSH format

10.- Create public key by copy-paste the content of the generated key,point 6, in a txt file and save it.

Note: Not the private key

Public key for pasting

Public key pasted into text editor


More information:

http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbaas/obe_dbaas_QS/oracle_database_cloud_service_dbaas_quick_start.html#section1




Access DBAAS through SSH


Sometimes you are required to enter to a machine node to make some administrative tasks, you cannot do in web consoles, so you need to enter with SSH.

With a client like MobaXterm, Putty, or whatever SSH Client you have do the following

Remote Host: Here you put the public ip
User: oracle | opc

oracle for common administrative tasks
opc user if you need root privilege using sudo command

Port: Use the default (22)

In auth section use the private key that you create when you configured your database service, you create 3 keys:

1.- Private Key
2.- Public Key
3.- SSH Key

Here you select your private key

Click in OK

Click in connect session







There you go ! 

DBAAS Useful Links


Here I share useful links when you have provisioned with database as a service:

The main requirements is that you have DB Enterprise Edition and service and listeners up and running:

Links:

EM
https://public-ip:5500/em/shell#/config/show_params
system/pwd

Database Monitor
https://public-ip/dbaas_monitor/
DBAAS_MONITOR/pwd

APEX
https://public-ip/ords/pdb1/f?p=4050:3:8030913058308:::::

INTERNAL (always)
ADMIN/pwd

GlassFish
https://public-ip:4848/common/index.jsf
admin/pwd

Make sure you have database instance up and running

For instance:

https://dbaas.oraclecloud.com/dbaas/faces/dbRunner.jspx username and password provided when Oracle granted your access.




And also in Compute Services.

https://computeui.us.oraclecloud.com/mycompute/faces/instances.jspx

Check if Instance and Network services are up and runnig.


If not restart the network services in update option


There you go!