UiBhelp's public knowledge cards

KI 3110 Connect to Managed NREC instances

Guide to connect to Managed NREC instances provided by Scientific Computing at the IT-department
Managed NREC instances are by default only delivered with SSH access. In addition, access is only allowed from the UiB network.

Login is done using your UiB username and password. You can find your username and also change your password at passord.uib.no.

Connecting via SSH:

After the instance is created, you will be provided with an IP address or domain name for the instance.
SSH is preinstalled on all modern operating systems and available through the Terminal app on your machine. On Windows, we recommend using PowerShell instead of cmd. On macOS and Linux, the app is called “Terminal”.

In the terminal, you connect using the following command:

ssh <username>@<instance address>

Ex:

ssh uib123@158.37.64.1

You will then be asked for your uib-password.
At the first time login you will also need to accept the instance certificate.

Requirement of UiB-network:

For security reasons, you can only connect from the UiB network.
For SSH connections, you mainly have two options:

Connect via VPN:
  1. Connect to VPN as described in KI 0706 - How do I connect to VPN?
  2. Start a new terminal-session after VPN is connected.
  3. You will now be able to connect to the instance as described above.
Koble til via login.uib.no
  1. Connect to SSH as described above, but instead use login.uib.no as the address
    Ex: uib123@login.uib.no
  2. As you log in you will receive a MFA-request on your MFA-device. This needs to be approved.
    After approval you will be connected to login.uib.no
  3. After you are connected to login.uib.no you will be able to connect via SSH as described above, from the same terminal window.
Bonus, SSH-alias:

The SSH-client can read configurations in a file named config i the hidden folder .ssh in the home-folder on your device.
I.e: ~/.ssh/config

In this you can create an alias for the connection following this template:

Host alias
    HostName <maskinens addresse>
    User <brukernavn>
    Port 22

Ex:
Host login
    HostName login.uib.no
    User uib123
    Port 22

With this entry you can connect to login.uib.no as the user uib123 by writing ssh login in a terminal window.
This is particularly useful if you are connecting via login.uib.no, as you can then use the ProxyJump instruction on the entries for Managed NREC instances:

Ex:
Host nrec
    HostName 158.37.64.1
    User uib123
    Port 22
    ProxyJump login

By then writing ssh nrec in a terminal window it will perform both the connections to login.uib.no and to the Managed NREC Instance sequentially.