{"id":21185,"library":"dvc-ssh","title":"dvc-ssh","description":"SSH plugin for DVC (Data Version Control) that enables remote storage on SSH servers. Current version 4.2.2, requires Python >=3.9. Active development with regular releases.","status":"active","version":"4.2.2","language":"python","source_language":"en","source_url":"https://github.com/iterative/dvc-ssh","tags":["dvc","ssh","remote-storage","data-version-control"],"install":[{"cmd":"pip install dvc-ssh","lang":"bash","label":"pip install"},{"cmd":"pip install dvc[ssh]","lang":"bash","label":"DVC with SSH support"}],"dependencies":[{"reason":"Core DVC functionality required","package":"dvc","optional":false},{"reason":"SSH connection handling (>=2.19.0)","package":"asyncssh","optional":false}],"imports":[{"note":"dvc-ssh is a plugin, not a standalone package. Import DVC from dvc.","wrong":"from dvc_ssh import DVC","symbol":"DVC","correct":"from dvc import DVC"},{"note":"The filesystem class is provided by dvc, not dvc-ssh.","wrong":"from dvc_ssh import SSHFileSystem","symbol":"RemoteLOCAL","correct":"from dvc.fs import SSHFileSystem"}],"quickstart":{"code":"import os\nfrom dvc import DVC\nfrom dvc.repo import Repo\n\n# Initialize DVC repository (in existing git repo)\nrepo = Repo.init()\n\n# Add remote SSH storage\nssh_url = f\"ssh://{os.environ.get('SSH_USER', 'user')}@{os.environ.get('SSH_HOST', 'example.com')}:{os.environ.get('SSH_PORT', '22')}{os.environ.get('SSH_PATH', '/path/to/storage')}\"\nrepo.add_remote(name='myremote', url=ssh_url, default=False)\n\n# Print configured remotes\nprint(repo.config['remote'])","lang":"python","description":"Initialize DVC repo with SSH remote. Run inside a git repository."},"warnings":[{"fix":"Replace any imports from dvc_objects.callbacks with from fsspec.callbacks and update callback usage accordingly.","message":"Version 4.0.0 replaced dvc_objects.callbacks with fsspec.callbacks. Custom callback implementations must be updated.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade DVC to version 3.x or later.","message":"Version 3.0.0 drops support for DVC 2.x. Ensure DVC version is >=3.0.0.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Set up passwordless SSH keys or configure asyncssh options via dvc config or environment variables.","message":"SSH configuration (host key verification, auth methods) is handled by asyncssh. Default behavior may prompt for passwords interactively.","severity":"gotcha","affected_versions":"all"},{"fix":"If atomic writes cause issues, you can set DVC_NO_ATOMIC_WRITE=1 environment variable or adjust remote permissions.","message":"File transfer uses atomic write by default since v4.2.2, which may fail on some filesystems with limited permissions.","severity":"gotcha","affected_versions":">=4.2.2"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"dvc-ssh is a plug-in, not a Python package to import. Install it with 'pip install dvc-ssh' and use DVC's API from the 'dvc' module (e.g., from dvc import DVC).","cause":"Trying to import dvc-ssh directly as a Python module.","error":"ModuleNotFoundError: No module named 'dvc_ssh'"},{"fix":"Install dvc-ssh with 'pip install dvc-ssh' and ensure DVC version >=3.0.","cause":"dvc-ssh is not installed or not compatible with the current DVC version.","error":"ERROR: failed to add remote - unknown remote type 'ssh'"},{"fix":"Use asyncssh's known_hosts configuration or set the environment variable 'ASYNCSSH_KNOWN_HOSTS' to point to a known_hosts file. Alternatively, disable host key checking (not recommended): add 'StrictHostKeyChecking no' to SSH config or set 'DVC_SSH_STRICT_HOST_KEY_CHECK=false'.","cause":"SSH host key verification failed because the host key is unknown or changed.","error":"asyncssh.errors.HostKeyNotVerifiable: No matching host key for server"},{"fix":"Ensure the SSH URL is in format 'ssh://user@host:port/path'. Use 'dvc remote list' to verify, and 'dvc remote modify' to update.","cause":"The remote URL is not properly configured or the path is invalid.","error":"Remote 'myremote' is not a DVC remote"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}