TOPICS
Guides

Quickstart: Create Your First VM on LunaNode

First, let's provision a virtual machine:

  1. Press Create VM from the LunaNode panel.
  2. Hostname: enter a name for the VM. This can be a domain name, or just an arbitrary label for your VM.
  3. Plan: we offer General-Purpose, Memory-Optimized, and Compute-Optimized plans that vary in the CPU, memory, disk, and bandwidth resources that they include.
  4. Image: templates immediately give you a usable VM, while ISOs require manual installation. You can also upload your own ISO and qcow2 images. For the quickstart, pick a template image.
  5. To create the VM, just press Create Virtual Machine.

Your VM will now appear on the dashboard. If you select the VM, you'll see a BUILD status indicating that it is being created.

Within sixty seconds, your VM should come online. You can connect to the VM with SSH using the username and password specified in the Initial Login Details, which you'll see after selecting the VM from the dashboard. To login as root, use sudo su.

Using SSH Keys

Instead of logging in with a password, you can setup SSH keys for passwordless authentication.

First, if you don't already have an SSH key on your computer, you'll need to create one. On Linux:

$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
$ ssh-keygen -t rsa

On Windows, you can use PuTTYgen.

Next, copy your SSH public key (e.g. from ~/.ssh/id_rsa.pub). In the LunaNode panel, go to SSH Keys, and add the public key. The public key should look similar to this:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDP3oGYqwGkUBj6CL83bg9HqI...

Now, when you create a new VM, you'll be able to set which SSH keys should be authorized to login to the VM. As long as you select at least one SSH key, password authentication will be disabled.

Setting a Root Password

You can login as root by running sudo su:

ubuntu@vm $ ls /root
ls: cannot open directory /root: Permission denied
ubuntu@vm $ sudo su
root@vm $ ls /root
root@vm $

If desired, you can set a root password and enable root login over SSH:

root@vm $ passwd
root@vm $ sed -i 's/.*PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
root@vm $ service ssh restart; service sshd restart