Connect to a VM with SSH

You can connect to a virtual machine (VM) in a VM Cluster by using a Secure Shell (SSH) connection.

Most UNIX-style systems, including Linux, Oracle Solaris, and macOS, include an SSH client. For Microsoft Windows systems, you can use an SSH client such as PuTTY.

Prerequisites for Connecting to a VM

Connect to a VM from a Microsoft Windows System Using PuTTY

You need the SSH private key file that matches the public key associated with the VM Cluster. This private key file must be in the PuTTY .ppk format. If the private key file was originally created on a Linux platform, you can use PuTTYgen to convert the key to the .ppk format.

  1. Download and install PuTTY.

    To download PuTTY, go to the PuTTY website and follow the download instructions.

  2. Run the PuTTY program, putty.exe.

    The PuTTY Configuration window is displayed, showing the Session panel.

  3. In the Host Name (or IP address) field, enter the host name or IP address of the VM that you want to access.

  4. Confirm that the Connection type option is set to SSH.

  5. In the Category tree, expand Connection, if necessary, and then select Data.

    The Data panel is displayed.

  6. In the Auto-login username field, enter opc.

    Connect as the opc user to perform operations that require root or oracle access to the VM. The opc user can use the sudo command to gain root access or switch to the oracle user.

  7. Confirm that the When username is not specified option is set to Prompt.

  8. In the Category tree, expand SSH, and then select Auth.

    The Auth panel is displayed.

  9. Select Browse next to the Private key file for authentication field.

  10. In the select private key file window, navigate to and open the private key file that matches the public key associated with the VM Cluster.

  11. In the Category tree, select Session.

    The Session panel is displayed.

  12. In the Saved Sessions field, enter a name for the connection configuration, and then select Save.

  13. Select Open to open the connection.

    The PuTTY Configuration window closes and the PuTTY terminal window is displayed.

    If this is the first time you are connecting to the VM, the PuTTY security alert window is displayed, prompting you to confirm the public key. Select Yes to continue connecting.

Connect to a VM from a UNIX-Style System

Enter the following SSH command:

ssh -i private-key user@node

where:

To perform operations that require root access to the VM, connect as the opc user.

The opc user can use the following command to gain root access:

sudo -s

To perform operations as the Oracle AI Database software owner, connect as the opc user and then switch to the oracle user.

sudo su - oracle