Hugo Virtual Machine Documentation


Useful links

Provisioning

The virtual machine (VM) can be provisioned in the same way as any other Azure VM.

  • It is strongly recommend to use SSH public key authentication rather than password
  • When provisioning, select "SSH public key" rather than "Password" as the authentication type

Authenticating

We strongly recommend using SSH public key authentication.

  • For more information on using SSH keys to authenticate with an Azure VM, see How to use SSH keys with Windows on Azure
  • To use GUI applications such as Visual Studio Code and Firefox will require a desktop interface
  • The VM is configured with the xfce desktop environment and xrdp remote desktop service
  • We recommend using a remote desktop connection over SSH. This offers better security than connecting directly using remote desktop.
  • The virtual machine is pre-configured, we just need to configure the client
    1. Login to the VM using a suitable SSH client - this will depend on your client OS For example, SSH on Linux or Putty on Windows
    2. Set a password for your VM user account (the VM default username is azureuser). (This is required for the remote desktop service. It does *not* change the SSH key requirement to login to the virtual machine. For more details see Use remote desktop with Ubuntu)
    3. sudo passwd azureuser
  • Next we need to configure an SSH tunnel for the remote desktop traffic, and the remote desktop client itself

Configure SSH tunnel

If using Windows, it is recommended to use the Putty client. If you don't have Putty installed, download and install Putty from the Microsoft Store.

    1. Launch Putty
    2. Set the hostname / IP address for the VM
    3. Navigate to Connection > SSH > Auth > Credentials
    4. Set the SSH private key file required to connect to the VM
    5. Navigate to Connection > SSH > Tunnels
    6. Enter the local port and destination address to be forwarded for remote desktop protocol
    7. Copy the values below (adjust the local port if desired) and click add
    8. In this case, local port 5555 is being mapped to port 3389 (the remote desktop port) on the virtual machine
    9. Validate the result against the image below
    10. Navigate back to the Session node and save the session

Configure Remote Desktop Client

If using Windows, you can use the built-in remote desktop client.

    1. Authenticate with Putty (above) - load your saved session and click "Open"
    2. Enter the virtual machine username (azureuser) to authenticate
    3. This will login to the VM and create an SSH tunnel for the remote desktop traffic
    4. Launch the Remote Desktop Connection app
    5. You name need to click "Show Option" to allow you to enter a username
    6. Set the Computer as localhost:5555
    7. Set the Username as the VM username (azureuser)
    8. Click "Connect". You will likely receive a certificate warning due to the tunnelling - be sure to check you are connecting to the right virtual machine
    9. You will be presented with the xrdp login screen - enter the password you created earlier
    10. You will then be connected to the VM in a remote desktop session

Install Visual Studio Code

Install Visual Studio Code or your preferred IDE

    1. In a remote desktop session, launch Firefox
    2. Navigate to https://code.visualstudio.com/Download
    3. Change directory to the download folder
    4. In the download folder run (setting the correct filename)
    5. sudo apt install ./code_x.xx.x-xxxxxxxxxx_amd64.deb

Hugo Quickstart

The quickstart in the Hugo docs is a great place to get up and running quickly.