Scenario: One VM with a public IP
This is the basic scenario of deploying one VM running Ubuntu Linux, and having a public IPv4 address accessible via SSH.
Deploy the instance
In this scenario, the public template is used. You need to have Show all selected in the group selection to see it.
Make sure you have uploaded your SSH public key as described in Configure SSH public key.
- If you belong to multiple groups, make sure the correct group is selected in the menu.
- Navigate to Instances ➡ VMs in the menu and click on the button to create the VM.
- Select the template Ubuntu 22.04 (ice-public).
- Fill in a VM name to use as hostname.
- When creating several VMs, the wildcard
%idx
will be replaced with a number starting from 0. In the legacy Sunstone GUI, the wildcard is%i
instead. - The VM Name defaults to the template name followed by the ID if left empty.
- When creating several VMs, the wildcard
- Optionally, adjust the capacity in terms of Memory and Virtual CPU.
- Click Next and fill in a Password for VNC console root access.
- Click Next and configure any advanced options, adjusting storage, etc. The public network is already selected in this template.
- Click Finish to deploy.
Password
The password is used when accessing the instance using the integrated VNC console in the OpenNebula web interface. Use username root. Note that the console is shared so if you log in others with access to the instance will also be logged in.
Access via SSH
Assuming the VM instance is installed as described above you can access the instance via SSH using the public IP address and the corresponding private key.
Locating the public IP address
The public IP address is found under Instances ➡ VMs, under the Info tab when clicking on the VM.
Access from Linux or Mac
By default, Linux and macOS come bundled with SSH clients that you can run in a terminal. Use the following command and replace the public IP.
You will need to confirm the instance's host key the first time.
Using other SSH keys
Use the -i
option to specify another private key if you are not using the default key pair.
Access from Windows
In Windows you can use the free PuTTY client. Use PuTTYgen to generate new or to convert existing keys.
- Configure the private key in PuTTY under Connection ➡ SSH ➡ Auth.
- Enter
root
as username under Connection ➡ Data. - Go to the Session section, enter the public IP, and click Open. You will need to confirm the instance's host key the first time.
SSH from Windows console
Windows 10 has a built-in OpenSSH client that allows you to access the server via the console but this component is not activated by default.