From f0fc09b65c6274cba92ee307934e5f692d446c19 Mon Sep 17 00:00:00 2001 From: Andy Teucher Date: Thu, 8 Jan 2026 11:36:20 -0800 Subject: [PATCH 1/3] Add IdentiesOnly to local ssh config as per https://github.com/yuvipanda/jupyter-sshd-proxy/pull/12 --- ssh-into-hub.qmd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssh-into-hub.qmd b/ssh-into-hub.qmd index 00e758c..8c08d77 100644 --- a/ssh-into-hub.qmd +++ b/ssh-into-hub.qmd @@ -135,6 +135,7 @@ If the file does not exist, create it, then open it in a text editor. Host User jovyan ProxyCommand websocat --binary -H="Authorization: token " asyncstdio: wss://%h/user//sshd/ + IdentitiesOnly yes # Don't use password auth ``` On Windows, the `asyncstdio:` argument will not work. You can simply omit it and use: @@ -142,6 +143,7 @@ On Windows, the `asyncstdio:` argument will not work. You can simply omit it and ```Host User jovyan ProxyCommand websocat --binary -H="Authorization: token " wss://%h/user//sshd/ + IdentitiesOnly yes ``` replace: @@ -156,6 +158,7 @@ Here's an example: Host openscapes.2i2c.cloud User jovyan ProxyCommand websocat --binary -H="Authorization: token ajklhdkfs989dfsbuw89983bf89se" asyncstdio: wss://%h/user/ateucher/sshd/ + IdentitiesOnly yes ``` On Windows, it would look like this: @@ -164,6 +167,7 @@ On Windows, it would look like this: Host openscapes.2i2c.cloud User jovyan ProxyCommand websocat --binary -H="Authorization: token ajklhdkfs989dfsbuw89983bf89se" wss://%h/user/ateucher/sshd/ + IdentitiesOnly yes ``` *Note that if you are connecting to your JupyterHub in a VSCode fork such as VSCodium, Cursor, or Positron, or any other IDE that uses the [open-remote-ssh](https://github.com/jeanp413/open-remote-ssh) extension, you need to make sure the value of the -H argument (`"Authorization: token xxxx"`) is enclosed in double quotes and not single quotes, or the connection will fail.* From cf0d73fb2a245a0c561ac9209afaf0563c6d31ef Mon Sep 17 00:00:00 2001 From: Andy Teucher Date: Thu, 8 Jan 2026 13:55:45 -0800 Subject: [PATCH 2/3] Formatting: code blocks and lists --- ssh-into-hub.qmd | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/ssh-into-hub.qmd b/ssh-into-hub.qmd index 8c08d77..5d8754b 100644 --- a/ssh-into-hub.qmd +++ b/ssh-into-hub.qmd @@ -49,7 +49,9 @@ If you are using Windows, it is recommended to use [Git for Windows](https://git To make websocat accessible from any command prompt or PowerShell window: **Option A: Using Windows Settings (Windows 10/11)** + This is different depending on your version of Windows, but generally: + 1. Open the Start Menu and search for "Environment Variables" 2. Select "Edit the system environment variables" 3. In the System Properties window, click on the "Environment Variables..." button @@ -63,20 +65,20 @@ This is different depending on your version of Windows, but generally: 1. Open a Command Prompt 2. Run the following command, replacing `C:\Path\To\Websocat\` with the actual path where you placed `websocat.exe`: -``` +```default setx PATH "%PATH%;C:\Path\To\Websocat\" ``` 3. Verify Installation Open a new command prompt or PowerShell window and run: -```shell +```default websocat --version ``` If you weren't able to add websocat to your PATH, you can still use it by providing the full path to the `websocat.exe`. For example: -```shell +```default C:/Users/YourUsername/AppData/Roaming/websocat/websocat --version ``` @@ -131,7 +133,7 @@ We will set up our ssh config file to tell `ssh` how to connect to our JupyterHu an entry that looks like this to the end of your `~/.ssh/config` file. If the file does not exist, create it, then open it in a text editor. -``` +```default Host User jovyan ProxyCommand websocat --binary -H="Authorization: token " asyncstdio: wss://%h/user//sshd/ @@ -140,7 +142,8 @@ Host On Windows, the `asyncstdio:` argument will not work. You can simply omit it and use: -```Host +```default +Host User jovyan ProxyCommand websocat --binary -H="Authorization: token " wss://%h/user//sshd/ IdentitiesOnly yes @@ -154,7 +157,7 @@ replace: Here's an example: -``` +```default Host openscapes.2i2c.cloud User jovyan ProxyCommand websocat --binary -H="Authorization: token ajklhdkfs989dfsbuw89983bf89se" asyncstdio: wss://%h/user/ateucher/sshd/ @@ -163,7 +166,7 @@ Host openscapes.2i2c.cloud On Windows, it would look like this: -``` +```default Host openscapes.2i2c.cloud User jovyan ProxyCommand websocat --binary -H="Authorization: token ajklhdkfs989dfsbuw89983bf89se" wss://%h/user/ateucher/sshd/ @@ -180,10 +183,11 @@ You will need to provide the full path to the `websocat` executable in the `Prox For example, if you placed `websocat.exe` in `C:/Users/andy/AppData/Roaming/websocat/`, your `~/.ssh/config` entry would look like this: -``` +```default Host openscapes.2i2c.cloud User jovyan ProxyCommand C:/Users/andy/AppData/Roaming/websocat/websocat --binary -H="Authorization: token ajklhdkfs989dfsbuw89983bf89se" wss://%h/user/ateucher/sshd/ + IdentitiesOnly yes ``` ::: @@ -237,7 +241,7 @@ for NMFS-Openscapes. If everything is set up correctly, you should be logged into your JupyterHub server via SSH, and you will have a new prompt in your terminal that looks something like this: -``` +```default (notebook) $ ``` @@ -252,13 +256,13 @@ To exit the SSH session, simply type `exit` and press Enter. You can also connect to your JupyterHub server via SSH from an IDE such as VSCode or Positron. 1. Make sure your JupyterHub server is running. -1. Open your IDE. -2. Open the command palette (e.g., `Ctrl+Shift+P` in VSCode). -3. Search for and select `Remote-SSH: Connect to Host...` -4. Type or select the name of the host you set up in your `~/.ssh/config` file (e.g., `openscapes.2i2c.cloud` or `nmfs-openscapes.2i2c.cloud`) and press Enter. +2. Open your IDE. +3. Open the command palette (e.g., `Ctrl+Shift+P` in VSCode). +4. Search for and select `Remote-SSH: Connect to Host...` +5. Type or select the name of the host you set up in your `~/.ssh/config` file (e.g., `openscapes.2i2c.cloud` or `nmfs-openscapes.2i2c.cloud`) and press Enter. ![](img/ssh-connect-positron.png) -5. A new IDE window will open, and you can open a folder or workspace on your JupyterHub server, and work there as if you were working locally. In the explorer pane, you should see buttons giving you the option to "Open Folder" or "Clone Repository". You can use "Open Folder" to open an existing folder on the JupyterHub server, or "Clone Repository" to clone a git repository directly into your JupyterHub server. +6. A new IDE window will open, and you can open a folder or workspace on your JupyterHub server, and work there as if you were working locally. In the explorer pane, you should see buttons giving you the option to "Open Folder" or "Clone Repository". You can use "Open Folder" to open an existing folder on the JupyterHub server, or "Clone Repository" to clone a git repository directly into your JupyterHub server. To close the remote connection, click on the box in the bottom-left corner of the IDE window and select "Close Remote Connection". From 8bb8cf87dc21a53fc0400dca14562490fa34c924 Mon Sep 17 00:00:00 2001 From: Andy Teucher Date: Thu, 8 Jan 2026 14:05:04 -0800 Subject: [PATCH 3/3] More misc formatting --- ssh-into-hub.qmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssh-into-hub.qmd b/ssh-into-hub.qmd index 5d8754b..92cca74 100644 --- a/ssh-into-hub.qmd +++ b/ssh-into-hub.qmd @@ -151,7 +151,9 @@ Host replace: - - `` with your hub domain (NASA: `openscapes.2i2c.cloud`, NMFS: `nmfs-openscapes.2i2c.cloud`)) + - `` with your hub domain + - NASA: `openscapes.2i2c.cloud`, + - NMFS: `nmfs-openscapes.2i2c.cloud` - `` with the token you generated earlier - `` with your jupyterhub username that you log in to the hub with (usually your github username)