Distri.AI
English
English
  • ๐ŸชŸIntroduction
    • ๐ŸงฒWhat is Distri.AI
    • ๐Ÿ—ž๏ธWhitepaper
  • ๐Ÿ•น๏ธGetting Started
    • ๐Ÿ›’User
    • ๐Ÿ› ๏ธCompute Node
    • ๐ŸšฐFaucet
  • ๐Ÿ”ฑDistri.AI Aggregator
    • ๐Ÿ๏ธGPU Market
    • ๐Ÿ›ซModel Hub
    • ๐Ÿ“‘Dataset Repository
  • ๐Ÿ“ฆML Workspace
    • ๐ŸคนJupyter
    • ๐Ÿคนโ€โ™€๏ธDesktop GUI
    • ๐Ÿคนโ€โ™€๏ธVisual Studio Code
    • ๐Ÿคนโ€โ™‚๏ธJupyterLab
    • ๐ŸคนGit Integration
    • ๐Ÿคนโ€โ™€๏ธFile Sharing
    • ๐Ÿคนโ€โ™‚๏ธAccess Ports
    • ๐ŸคนTensorboard
    • ๐Ÿคนโ€โ™€๏ธExtensibility
    • ๐Ÿคนโ€โ™‚๏ธHardware Monitoring
    • ๐ŸคนSSH Access
    • ๐Ÿคนโ€โ™€๏ธRemote Development
    • ๐Ÿคนโ€โ™‚๏ธRun as a job
    • ๐Ÿ“ฌFAQ
  • ๐Ÿ“žContact & Social Media
Powered by GitBook
On this page
  1. ML Workspace

SSH Access

PreviousHardware MonitoringNextRemote Development

Last updated 1 year ago

SSH provides a powerful set of features that enables you to be more productive with your development tasks. You can easily set up a secure and passwordless SSH connection to a workspace by selecting Open Tool -> SSH. This will generate a secure setup command that can be run on any Linux or Mac machine to configure a passwordless & secure SSH connection to the workspace. Alternatively, you can also download the setup script and run it (instead of using the command).

The setup script only runs on Mac and Linux. Windows is currently not supported.

Just run the setup command or script on the machine from where you want to setup a connection to the workspace and input a name for the connection (e.g., my-workspace). You might also get asked for some additional input during the process, e.g. to install a remote kernel if remote_ikernel is installed. Once the passwordless SSH connection is successfully setup and tested, you can securely connect to the workspace by simply executing ssh my-workspace.

Besides the ability to execute commands on a remote machine, SSH also provides a variety of other features that can improve your development workflow as described in the following sections.

Tunnel Ports (click to expand...)

An SSH connection can be used for tunneling application ports from the remote machine to the local machine, or vice versa. For example, you can expose the workspace internal port 5901 (VNC Server) to the local machine on port 5000 by executing:

ssh -nNT -L 5000:localhost:5901 my-workspace

To expose an application port from your local machine to a workspace, use the -R option (instead of -L).

autossh -M 0 -f -nNT -L 5000:localhost:5901 my-workspace

Port tunneling is quite useful when you have started any server-based tool within the workspace that you like to make accessible for another machine. In its default setting, the workspace has a variety of tools already running on different ports, such as:

  • 8080: Main workspace port with access to all integrated tools.

  • 8090: Jupyter server.

  • 8054: VS Code server.

  • 5901: VNC server.

  • 3389: RDP server.

  • 22: SSH server.

Copy Data via SCP (click to expand...)
scp ./local-file.txt my-workspace:/workspace

To copy the /workspace directory from my-workspace to the working directory of the local machine, execute:

scp -r my-workspace:/workspace .
Sync Data via Rsync (click to expand...)
scp ./local-file.txt my-workspace:/workspace

To copy the /workspace directory from my-workspace to the working directory of the local machine, execute:

scp -r my-workspace:/workspace .
Mount Folders via SSHFS (click to expand...)
sshfs -o reconnect my-workspace:/workspace /local/folder/path

Once the remote directory is mounted, you can interact with the remote file system the same way as with any local directory and file.

After the tunnel is established, you can use your favorite VNC viewer on your local machine and connect to vnc://localhost:5000 (default password: vncpassword). To make the tunnel connection more resistant and reliable, we recommend to use to automatically restart SSH tunnels in the case that the connection dies:

You can find port information on all the tools in the .

๐Ÿ“– For more information about port tunneling/forwarding, we recommend .

allows files and directories to be securely copied to, from, or between different machines via SSH connections. For example, to copy a local file (./local-file.txt) into the /workspace folder inside the workspace, execute:

๐Ÿ“– For more information about scp, we recommend .

allows files and directories to be securely copied to, from, or between different machines via SSH connections. For example, to copy a local file (./local-file.txt) into the /workspace folder inside the workspace, execute:

๐Ÿ“– For more information about scp, we recommend .

Besides copying and syncing data, an SSH connection can also be used to mount directories from a remote machine into the local filesystem via . For example, to mount the /workspace directory of my-workspace into a local path (e.g. /local/folder/path), execute:

๐Ÿ“– For more information about sshfs, we recommend .

๐Ÿ“ฆ
๐Ÿคน
autossh
supervisor configuration
this guide
SCP
this guide
SCP
this guide
SSHFS
this guide