SSH wrapper driver for Jumpstarter that provides SSH CLI functionality
Project description
SSHWrapper Driver
jumpstarter-driver-ssh provides SSH CLI functionality for Jumpstarter, allowing you to run SSH commands with configurable defaults and pass-through arguments.
Installation
pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple/ jumpstarter-driver-ssh
Configuration
Example configuration:
export:
ssh:
type: jumpstarter_driver_ssh.driver.SSHWrapper
config:
default_username: "root"
ssh_command: "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
children:
tcp:
type: jumpstarter_driver_network.driver.TcpNetwork
config:
host: "192.168.1.100"
port: 22
Usage
The SSH driver provides a CLI command that accepts all standard SSH arguments:
# Basic SSH connection (uses port forwarding by default)
j ssh
# SSH with direct TCP address
j ssh --direct
# SSH with specific user
j ssh -l myuser
# SSH with other flags
j ssh -i ~/.ssh/id_rsa
# Running a remote command
j ssh ls -la
CLI Options
The SSH command supports the following options:
--direct: Use direct TCP address (default is port forwarding)
All other arguments are passed directly to the SSH command. The driver uses the configured SSH command and default username from the driver configuration.
Username Handling
The driver supports multiple ways to specify the username:
-l usernameflag: Explicit username specification (takes precedence)- Default username: Used when no username is specified in arguments
If no -l flag or user@hostname format is provided, the default username from the driver configuration will be used automatically.
Dependencies
ssh: Standard SSH client (usually pre-installed)
API Reference
Driver Methods
.. autoclass:: jumpstarter_driver_ssh.client.SSHWrapperClient()
:members: run
Configuration Parameters
| Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
| default_username | Default SSH username to use when no username is specified in the command | str | no | "" |
| ssh_command | SSH command to use for connections | str | no | "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR" |
Required Children
tcp: A TcpNetwork driver instance that provides the connection details (host and port)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jumpstarter_driver_ssh-0.7.2.tar.gz.
File metadata
- Download URL: jumpstarter_driver_ssh-0.7.2.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fadc7dc1da75b5497c5d22189027d47f32a06776fa1cedb6b8d4bffcc6454896
|
|
| MD5 |
c73094638adbae2f60ba187cf0a07446
|
|
| BLAKE2b-256 |
66a6d4e3c81f3f0004d8cc555d7cb7b76e6ebbbc45062c15f0b3bf498f29301d
|
File details
Details for the file jumpstarter_driver_ssh-0.7.2-py3-none-any.whl.
File metadata
- Download URL: jumpstarter_driver_ssh-0.7.2-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c755143c6038c5452e6a3f38c6b264787e2273f9c311bb4db76942a657e7988e
|
|
| MD5 |
3d3bc8367bf113760e5646db50192ac7
|
|
| BLAKE2b-256 |
0560e83ad5698d6dd0d2113be6d5d5add42ba46c7bb8e86cb6a5dc1a93ad1188
|