Skip to main content

SSHMount Driver

jumpstarter-driver-ssh-mount provides remote filesystem mounting via sshfs. It allows you to mount remote directories from a target device to your local machine using SSHFS (SSH Filesystem).

Installation

pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple/ jumpstarter-driver-ssh-mount

You also need sshfs installed on the client machine:

  • Fedora/RHEL: sudo dnf install fuse-sshfs
  • Debian/Ubuntu: sudo apt-get install sshfs
  • macOS: Install macFUSE and SSHFS from https://macfuse.github.io/, please note that it needs special handling to enable the macOS kernel extensions, read the install documentation carefully.

Configuration

The SSHMount driver references an existing SSH driver to inherit credentials (username, identity key) and TCP connectivity. No duplicate configuration is needed.

Example exporter configuration:

export:
  ssh:
    type: jumpstarter_driver_ssh.driver.SSHWrapper
    config:
      default_username: "root"
      # ssh_identity_file: "/path/to/ssh/key"
    children:
      tcp:
        type: jumpstarter_driver_network.driver.TcpNetwork
        config:
          host: "192.168.1.100"
          port: 22
  mount:
    type: jumpstarter_driver_ssh_mount.driver.SSHMount
    children:
      ssh:
        ref: "ssh"

CLI Usage

Inside a jmp shell session:

# Mount remote filesystem (spawns a subshell; type 'exit' to unmount)
j mount /local/mountpoint
j mount /local/mountpoint -r /remote/path
j mount /local/mountpoint --direct

# Mount in foreground mode (blocks until Ctrl+C)
j mount /local/mountpoint --foreground

# Pass extra sshfs options (-o forwards each value as an sshfs -o flag)
j mount /local/mountpoint -o reconnect -o cache=yes

# Override default SSH options (e.g., enable host key checking)
j mount /local/mountpoint -o StrictHostKeyChecking=yes

# Allow other users to access the mount (requires user_allow_other in /etc/fuse.conf)
j mount /local/mountpoint -o allow_other

# Unmount an orphaned mount
j mount --umount /local/mountpoint
j mount --umount /local/mountpoint --lazy

By default, j mount runs sshfs in foreground mode and spawns a subshell with a modified prompt. The mount stays active while the subshell is running. When you type exit (or press Ctrl+D), sshfs is terminated and all resources (port forwards, temporary identity files) are cleaned up automatically.

Use --foreground to skip the subshell and block directly on sshfs. Press Ctrl+C to unmount.

The --umount flag is available as a fallback for mounts that were orphaned (e.g., if the process was killed without cleanup).

API Reference

SSHMountClient

  • mount(mountpoint, *, remote_path="/", direct=False, foreground=False, extra_args=None) - Mount remote filesystem locally via sshfs
  • umount(mountpoint, *, lazy=False) - Unmount an sshfs filesystem (fallback for orphaned mounts)

Required Children

Child name Type Description
ssh jumpstarter_driver_ssh.driver.SSHWrapper SSH driver providing credentials (username, identity key) and TCP connectivity. Must itself have a tcp child of type TcpNetwork.

CLI

The driver registers as mount in the exporter config. When used in a jmp shell session, the CLI is a single command with a --umount flag for unmounting.

Note: Each -o value is forwarded directly to sshfs as an -o option flag. You can pass any option that sshfs (and by extension, the underlying SSH client) supports. By default, the driver sets StrictHostKeyChecking=no, UserKnownHostsFile=/dev/null, and LogLevel=ERROR. To override a default, pass the replacement via -o (e.g., -o StrictHostKeyChecking=yes). Common options include reconnect, cache=yes, ServerAliveInterval=15, and compression=yes. If you need other users on the system to access the mounted filesystem, pass -o allow_other (requires user_allow_other in /etc/fuse.conf). If allow_other fails due to FUSE configuration, the mount will automatically retry without it.

Metadata

Release files for jumpstarter-driver-ssh-mount 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jumpstarter-driver-ssh-mount 0.9.0
File Size Uploaded
jumpstarter_driver_ssh_mount-0.9.0.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jumpstarter-driver-ssh-mount 0.9.0
File Interpreter ABI Platform
jumpstarter_driver_ssh_mount-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.1 kB

Release files / jumpstarter_driver_ssh_mount-0.9.0.tar.gz

Download URL jumpstarter_driver_ssh_mount-0.9.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dd2782636142cdb5deca9975da26703c1aff21ebe2e02e2e0673b4671c4a9e1e
BLAKE2b-256 checksum
How to use checksums
7bdb53dab0bafdd802100cded5d473d3d2e1455100c9e1f20ba0206351e93e94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / jumpstarter_driver_ssh_mount-0.9.0-py3-none-any.whl

Download URL jumpstarter_driver_ssh_mount-0.9.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9232de7d3625e2a7a09358904617f6a45fcb3817020eac5dc6a51e88de0504ba
BLAKE2b-256 checksum
How to use checksums
42642fe9d52ad21ac70fe3e6f5b892bbf771571a12386ea56d22ad61631e7120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page