dagster-ssh

raw JSON →
0.29.3 verified Fri May 01 auth: no python

Provides SSH/SFTP resource and I/O manager for Dagster pipelines. Current version: 0.29.3. Release cadence matches Dagster core releases (approximately monthly).

pip install dagster-ssh
error ImportError: cannot import name 'SSHResource' from 'dagster_ssh'
cause The old import path `from dagster_ssh.resources import SSHResource` no longer works in dagster-ssh >=0.15.0.
fix
Use from dagster_ssh import SSHResource instead.
error ModuleNotFoundError: No module named 'paramiko'
cause The `paramiko` library is a required dependency that is not automatically installed with dagster-core, but it is bundled with dagster-ssh. If using a minimal installation, you may be missing it.
fix
Install dagster-ssh with pip install dagster-ssh (includes paramiko).
error paramiko.ssh_exception.AuthenticationException: Authentication failed.
cause SSHResource configured with incorrect credentials or key file path.
fix
Verify SSH credentials in environment variables or key_data contents. For key-based auth, ensure key_data (or key_file) corresponds to a valid private key. Try connecting manually via ssh command.
breaking In version 0.15.0, the SSH resource import path changed from `dagster_ssh.resources.SSHResource` to `dagster_ssh.SSHResource`. Old imports will break. Update your imports accordingly.
fix Change `from dagster_ssh.resources import SSHResource` to `from dagster_ssh import SSHResource`.
deprecated The `key_file` parameter in SSHResource is deprecated in favor of `key_data` for inline key content. As of 0.22.0, passing a file path may continue to work but raises a deprecation warning.
fix Instead of `key_file='/path/to/key'`, use `key_data=open('/path/to/key').read()`.
gotcha When using SSHIOManager, ensure the SSH host is reachable and credentials are correct before materializing assets. The IO manager does not validate connectivity at configuration time, only during runtime.
fix Add a resource initialization check in your job or sensor to catch misconfigurations early.
gotcha SSHResource does not automatically close connections when used as a context manager. Always wrap usage in a `with ssh_resource.get_connection():` block to avoid resource leaks.
fix Use `with ssh_resource.get_connection() as conn:` to ensure connections are properly closed.

Configure an SSH resource with environment variables for credentials.

from dagster_ssh import SSHResource

ssh_resource = SSHResource(
    remote_host=os.environ.get('SSH_HOST', ''),
    remote_port=22,
    username=os.environ.get('SSH_USERNAME', ''),
    password=os.environ.get('SSH_PASSWORD', ''),
    key_file=os.environ.get('SSH_KEY_FILE', None),
)
print('SSH resource configured successfully.')