Skip to content

Commit 82abfb0

Browse files
committed
adjusted wording around nebari vs jhub servers, removed the escape slashes from the angle brackets for now
1 parent 54a6a76 commit 82abfb0

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

docs/docs/how-tos/connect-via-ssh.mdx

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,73 @@
11
---
22
id: connect-via-ssh
3-
title: Connect to Nebari via SSH or SFTP
3+
title: Connect to Nebari's JupyterLab via SSH or SFTP
44
description: Set up a remote SSH connection using jupyter-ssh
55
---
66

7-
# Connect to Nebari via SSH or SFTP
7+
# Connect to Nebari's JupyterLab via SSH or SFTP
88

9-
Secure Shell Protocol (SSH) is a standard protocol for communicating securely over a network connection. Secure File Transfer Protocol (SFTP) is based on SSH and transfers files to and from a remote machine. In this guide, you will learn how to connect and launch your JupyterLab user instance via SSH and transfer files using SFTP from your local machine.
9+
Secure Shell Protocol (SSH) is a standard protocol for communicating securely over a network connection. Secure File Transfer Protocol (SFTP) is based on SSH and transfers files to and from a remote machine. In this guide, you will learn how to connect and launch your JupyterLab user instance via SSH and transfer files using SFTP from your local machine.
1010

11-
Nebari includes a package called [`jupyterhub-ssh`](https://github.com/yuvipanda/jupyterhub-ssh) in all deployments to allow remote connection to their user instances. On Nebari, SSH connections are set up on port 8022 and SFTP connections on port 8023.
11+
Nebari includes a package called [`jupyterhub-ssh`](https://github.com/yuvipanda/jupyterhub-ssh) in all deployments to allow remote connection to their user instances. On Nebari, SSH connections are set up on port 8022 and SFTP connections on port 8023.
12+
13+
:::note
14+
There is a distinction between the Nebari and JupyterHub servers, though these are easily conflated by end users.
15+
Nebari itself is generally accessed via [kubectl](/how-tos/debug-nebari#installing-kubectl)
16+
to connect directly to the cluster (nodes or pods), while the JupyterHub server runs _on_ Nebari and controls the spawning of
17+
user instances of JupyterLab. The approach described here uses a JupyterHub plugin, `jupyterhub-ssh`, to spawn and access users' JupyterLab instance
18+
:::
1219

1320
## Prepare for the connection on the Nebari deployment
1421

15-
You will create a JupyterHub _token_ in order to access your server remotely. To do this, log into your Nebari deployment and navigate to the JupyterHub token page, \<your-nebari-domain.org/hub/token\>.
22+
You will create a JupyterHub _token_ in order to access your server remotely. To do this, log into your Nebari deployment and navigate to the JupyterHub token page, <your-nebari-domain.org/hub/token>.
1623

1724
This page is also accessible via the Nebari Home Page:
1825

19-
* If your deployment has `jhub-apps` enabled, you can navigate to this page by selecting the `Token` option under your username in the upper righthand corner.
20-
* If your deployment does not have `jhub-apps` enabled, you can click on the `Token` link on the top navigation bar.
26+
- If your deployment has `jhub-apps` enabled, you can navigate to this page by selecting the `Token` option under your username in the upper righthand corner.
27+
- If your deployment does not have `jhub-apps` enabled, you can click on the `Token` link on the top navigation bar.
2128

2229
You may add a note and expiration date to the token. You can leave the scopes field blank to give the token all the permissions that your user typically has on JupyterHub (which is the service on which Nebari is running).
2330

2431
## Connect to Nebari via SSH
2532

26-
Before you being, you'll need to have SSH installed on your local machine. From a terminal, use `ssh` to begin the connection.
33+
Before you being, you'll need to have SSH installed on your local machine. From a terminal, use `ssh` to begin the connection.
2734

28-
`ssh \<your-nebari-domain.com\> -l \<your-username\> -p 8022`
35+
`ssh <your-nebari-domain.com> -l <your-username> -p 8022`
2936

30-
:::note
31-
The syntax for `\<your-nebari-domain.com\>` is important - do not include `https://` or a trailing `/`.
37+
:::important
38+
The syntax for `<your-nebari-domain.com>` is important - do not include `https://` or a trailing `/`.
39+
40+
If you have the incorrect syntax, it will result in the error:
3241

33-
If you have the incorrect syntax, it will result in the error: `Could not resolve hostname \<your-nebari-domain.com\>: nodename nor servname provided, or not known`
42+
`Could not resolve hostname <your-nebari-domain.com>: nodename nor servname provided, or not known`
3443
:::
3544

36-
You will then be prompted for your password. Enter the token as the password and press `Enter`.
45+
You will then be prompted for your password. Enter the token as the password and press `Enter`.
3746

3847
If you don't already have a JupyterLab server running on your Nebari instance, it may take several minutes for the server to start up. The `ssh` connection has it's own timeout period which is likely shorter than the time it takes to spinup a new server. Therefore, you may see the following error as the `ssh` connection times out:
3948

4049
`Starting your server............................................failed to start server on time!`
4150

42-
The good news is that Nebari is still working on spinning up your server. Retry the `ssh` connection until the connection is established once the server is up and accessible.
51+
The good news is that Nebari is still working on spinning up your server. Retry the `ssh` connection until the connection is established once the server is up and accessible.
4352

4453
Once the connection is complete, you will have terminal access to your JupyterLab instance on Nebari.
4554

4655
## Use SFTP to transfer files to/from Nebari
4756

48-
SFTP, which stands for _Secure File Transfer Protocol_, is a protocol built into SSH that can implement file transfer commands over a secure connection. The SFTP port on Nebari is 8023.
57+
SFTP, which stands for _Secure File Transfer Protocol_, is a protocol built into SSH that can implement file transfer commands over a secure connection. The SFTP port on Nebari is 8023.
4958

50-
Utilizing SFTP will depend on how your local machine is configured and the utility you're using for SFTP. In some cases, your SSH configuration will allow SFTP to work "out of the box". Other times, special SFTP setup is required in your SSH configuration to allow for these connections.
59+
Utilizing SFTP will depend on how your local machine is configured and the utility you're using for SFTP. In some cases, your SSH configuration will allow SFTP to work "out of the box". Other times, special SFTP setup is required in your SSH configuration to allow for these connections.
5160

5261
## Dangerous, but useful information
5362

5463
:::warning
55-
The following suggestion is not recommended unless absolutely necessary since it will artificially keep a JupyterLab instance running which may have financial repercussions.
64+
The following suggestion is not recommended unless absolutely necessary since it will artificially keep a JupyterLab instance running which may have financial repercussions.
5665
:::
5766

58-
If you have a long-running task and you need to avoid the idle-culler on JupyterLab, you can use [tmux](https://github.com/tmux/tmux/wiki) to keep your server alive while your task is completing.
67+
If you have a long-running task and you need to avoid the idle-culler on JupyterLab, you can use [tmux](https://github.com/tmux/tmux/wiki) to keep your server alive while your task is completing.
5968

6069
Short list of useful commands:
70+
6171
- Create a new session `tmux new -s mysession`
6272
- Detach from session <kbd>ctrl</kbd> + <kbd>b</kbd> <kbd>d</kbd>
6373
- List available session `tmux ls`

0 commit comments

Comments
 (0)