1

Set up your SSH key

  1. Open Terminal & go inside the ~/.ssh directory:

    To go into the directory and see if you already have a saved public key, run the following command:

    cd ~/.ssh && ls ~/.ssh/*.pub
    

    This command displays the files within the SSH directory. If you have an SSH key, there will be a file ending with .pub.

  2. If you have no SSH key, follow this tutorial.

  3. To get your SSH key, enter this in your terminal:

    pbcopy < ~/.ssh/name_of_file_that_ends_with_.pub
    

    Don’t worry if there is no output. This automatically copies your key into your clipboard.

2

Enter the SSH Key in Latch

  1. Go back to Developer settings to enter the key you just copied.
    Please make sure that there is no empty line after you enter your SSH key.
3

Test if your SSH Key was added successfully

  1. Start your pod.

    The Pod needs to say “Running” before you can connect to VSCode.

  2. Copy the SSH command from your pod.

  3. Past the SSH command into the terminal.

    If your SSH was added successfully, the directory you are in will change to the pod.

4

Connect to VSCode

  1. Download the “Remote - SSH” extension in VSCode.

  2. Click on the small green or blue remote icon at the bottom left of your VSCode Window.

    The icon looks like a greater than sign slightly under a less than sign.

  3. Select “Connect to Host”.

  4. Select “Add New SSH Host”.

  5. Copy the SSH command on the sidebar of Pods.

  6. Paste the SSH command into VS Code.

  7. In the bottom right corner, click connect in the Host Added pop-up.

  8. Another VS Code window will open and connect to your SSH.

    You can mouse over the green/blue remote icon in the bottom left corner to see the host IP and the status of your SSH connection.

  9. Once you are connected, you can start programming in the SSH.

    Click on the explorer tab, then click open folder and open sdk_tutorial.ipynb to test out programming in the SSH!