Get Instance VNC Key

This API enables you to get information for accessing the VNC for the instance, such as VNC/SSH IP address, SSH port, VNC port, SSH user, and SSH private key. This information is used to create an SSH tunnel, which enables a local VNC client to connect to the VM's console.

Method

GET

REST Resource

/instancevnckey/name

URI

https://api_endpoint/instancevnckey/name

URI Parameter

Parameter Description
name Name of the instance.

Example URI

https://api.oc.example.com/instancevnckey/mytenant/public/f83ba187-2412-46f7-be6c-3a42ae0bcc9a

Example Response Body

{

"vncip": "api.oc.example.com", 
"vnckey": "-----BEGIN RSA PRIVATE KEY-----\jdlw3uhn...../Sj5BGY\n-----END RSA PRIVATE KEY-----", 
"vnc_user": "84affefab5e244f28634a900c439c227", 
"vncport": 5901, 
"uri": "https://api/instancevnckey/mytenant/public/jaas/DocInstance/wls/vm-1/84affefa-b5e2-44f2-8634-a900c439c227", 
"name": "/mytenant/public/jaas/DocInstance/wls/vm-1/84affefa-b5e2-44f2-8634-a900c439c227", 
"vnc_sshd_port": 62301

}

From the response body JSON data, save the value of attribute vnckey to an SSH key file. Use this file as the key (identity) file when executing the SSH command to enable the local VNC client to connect to the VM’s console. Example:

$ ssh -L8888:localhost:5901 84affefab5e244f28634a900c439c227@api.oc.example.com -p 62301 -i keyfile