SSH

A SSH “jump host” is deployed with this chart to allow users to use scp and sftp to copy files to the NFS. Each notebook server starts its own SSH service, allowing users to access their notebook servers using ssh via the jump host.

If a user wants to utilize this, they should perform the following steps:

  1. Launch their notebook server.

  2. Start a terminal and open the file ~/.ssh/authorized_keys with a text editor.

  3. On their local machine, the user should generate a new or reuse an old SSH public key. Existing public/private key pairs may be named ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub. New public/private key pairs can be generated by running ssh-keygen. The user should copy their public key from their local machine and add it as a new line in the file from (2) on the remote machine.

  4. The user should edit the file ~/.ssh/config on their local machine to include the following, replacing <username> with their username on the JupyterHub:

Host lsst-hub-ssh
    User <username>
    Hostname ssh.lsst.dirac.dev

Host lsst-hub
    User <username>
    Hostname lincc-<username>.notebooks
    ProxyJump lsst-hub-ssh

For example:

Host lsst-hub-ssh
    User stevenstetzler
    Hostname ssh.lsst.dirac.dev

Host lsst-hub
    User stevenstetzler
    Hostname lincc-stevenstetzler.notebooks
    ProxyJump lsst-hub-ssh

5. On their local machine, the user can ssh to their running notebook server using:

$ ssh lsst-hub

Alternatively, they can specify the jump host explicitly:

$ ssh -J <username>@ssh.lsst.dirac.dev <username>@lincc-<username>.notebooks