Auckland's Nectar operational staff may ask you to configure an SSH key on your Nectar Linux virtual machine (VM).


There may be multiple ways for you to do this, and what is easiest depends on how you launched your VM and how you use it. That is, whether you launched your instance as

  1. A "plain" virtual machine, as described here, and you connect to it by logging in through SSH, or
  2. An application like R-Studio or Jupyter notebook from the Nectar application catalog, and you connect to it through a browser

If you connect to your VM through SSH

Please log in using the default user account, as usual.
Then, at the command prompt, issue the following command to configure the public key:

echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMgevD39irfxQAoX/zeHy3rewdvlcENTlaBSD8Gp2HAD aklops" >> ~/.ssh/authorized_keys

If you connect to your VM through a browser

In this case, there are multiple ways to configure the SSH key, but the following is perhaps the easiest. Taking each browser application in turn:

R-Studio

  1. Load the URL of your R-Studio VM into a browser window
  2. On the start page, choose R-Studio
  3. On the login page, type the username and password you chose when you launched this R-Studio application (replace the values you see in this screenshot with your values), and click the "Sign In" button: 
  4. In the R-Studio development environment, click the Terminal tab 
  5. Copy and paste the following command into the terminal window and hit <enter>:
    echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMgevD39irfxQAoX/zeHy3rewdvlcENTlaBSD8Gp2HAD aklops" >> ~/.ssh/authorized_keys
  6. Let us know the username for this instance. This is the username you use when you log in to the instance. In the above screenshot it would be mfel395.

Jupyter Notebook

  1. Load the URL of your Jupyter Notebook VM into a browser window
  2. Log in using the password you specified when you launched this Jupyter Notebook application:
  3. Open a Terminal: 
  4. Copy and paste the following command into the terminal window and hit <enter>:
    echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMgevD39irfxQAoX/zeHy3rewdvlcENTlaBSD8Gp2HAD aklops" >> ~/.ssh/authorized_keys
  5. Let us know the username for this instance. You can find out the username by typing the command whoami, followed by the return key, in the terminal. Alternatively, you can find the username in the command prompt in the terminal. In the above screenshot it would be mfel395.