Connecting to a login node

It can be desirable to connect to a specifc login node on Unity, like when you have a tmux or screen session running, or if you are using vscode and it gets confused when switching login nodes.

Here are some different options to choose a particular login node, assuming the node is available:

Direct SSH

With the configuration file in SSH Config Generator, run ssh login1 (or similar) to get a specific login node, or run ssh unity to get any login node.

stylus_note

How to chose a login node if you do not have a preference:

  • Pick a value like the last two digits of your phone number (or other ID number)
  • Take the remainder divided by 8 and add 1
  • e.g., a number ending in 47 would use login8

Mosh

Mosh uses SSH and allows your machine to disconnect and reconnect, even when changing IPs, without losing state, assuming the server has not rebooted. To do this, Mosh needs to know a secondary range of ports to use.

With the configuration file from SSH Config Generator, use one of the following commands:

mosh --port=60001:60500 login1
mosh --port=60501:61000 login2
mosh --port=61001:61500 login3
mosh --port=61501:62000 login4
mosh --port=62001:62500 login5
mosh --port=62501:63000 login6
mosh --port=63001:63500 login7
mosh --port=63501:64000 login8

With EternalTerminal

EternalTerminal uses a similar mechanism to mosh, but requires you to specify a single different port instead of a range of ports.

With the configuration file from SSH Config Generator, use one of the following commands:

et login1:2021
et login2:2022
et login3:2023
et login4:2024
et login5:2025
et login6:2026
et login7:2027
et login8:2028

VS Code

Unfortunately, Visual Studio Code’s “Remote - SSH” plugin does not support using Mosh or EternalTerminal as a replacement for SSH.

SSH Config Generator

Use the generator below to create an SSH configuration file.

  1. When finished, download this file as unity.conf to your ~/.ssh directory
  2. Add Include ~/.ssh/unity.conf to your ~/.ssh/config above any existing Host or Match blocks, if any. If you do not have an existing ~/.ssh/config, create it with just the Include ~/.ssh/unity.conf line.

When you add Include ~/.ssh/unity.conf, remove any Unity-related blocks in your existing ~/.ssh/config file.

After filling in the form save the result: