sshfs
SSH Filesystem -- Async SSH/SFTP backend for fsspec
What it is and what it does
sshfs is an fsspec filesystem backend that lets you interact with remote files over SFTP/SSH as if they were local files. It wraps asyncssh to provide async, non-blocking I/O and integrates with fsspec's standardized filesystem API, so you can use familiar operations like open(), read(), write(), mkdir(), and find() against remote servers.
You can authenticate with passwords or private keys, and the package handles channel management internally. It supports both the high-level fsspec.open() interface for simple file access and the SSHFileSystem class directly for more complex operations. The implementation covers the full fsspec protocol and adds SSH-specific features like server-side copy through command execution.
Use it for:
- Transfer files between local and remote servers within Python scripts without spawning subprocess calls to scp or sftp.
- Stream large remote files for processing without downloading them entirely to disk first.
- Automate remote file management tasks (create directories, list contents, delete files) from Python code.
- Integrate remote file access into data pipelines that already use fsspec for other storage backends.
- Build tools that need to work with files on multiple SSH servers with a unified, async-friendly interface.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides an fsspec-compatible filesystem interface for SFTP/SSH connections, allowing you to read, write, and manage files on remote servers using standard filesystem operations.
Yes. Active maintenance, permissive license, low install friction, no known vulnerabilities, and a clean async design make this a solid choice for Python-based SFTP access. Use it if you need to treat remote SSH filesystems as fsspec-compatible storage or prefer async I/O over blocking SFTP libraries.
Install
sshfs on PyPI
pip
pip install sshfsuv
uv add sshfspoetry
poetry add sshfsInstalling sshfs
Before you install
Low friction install with only two runtime dependencies (fsspec and asyncssh). Active maintenance with a release 7 days ago and last commit on 2026-08-07.
License in practice
Apache-2.0 permissive license allows unrestricted use, modification, and distribution in both open-source and proprietary projects.
Quickstart
pip install sshfs
from sshfs import SSHFileSystem
fs = SSHFileSystem('example.com', username='user', password='pass')
with fs.open('/path/to/file', 'r') as f:
content = f.read()
Requires Python 3.9 or later; remote SSH server must be accessible and credentials (password or client_keys) must be provided.
Verify before relying
- Performance characteristics compared to other SFTP libraries beyond the description's claim of being 'quite fast'.
- Whether server-side copy via SSH command execution is available for all SSH server types or only specific implementations.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — fsspec, asyncssh |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,026,665/month — #2,783 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sshfs-2026.8.0-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
asyncsshAsyncSSH provides an asynchronous SSH client…
copyleft · top 5,000 on PyPI
fs.sshfsfs.sshfs provides a PyFilesystem2 interface to…
copyleft · top 15,000 on PyPI
ocifsProvides a fsspec-compatible filesystem…
unclear · top 15,000 on PyPI
scmreposcmrepo provides an fsspec-based filesystem…
permissive · top 5,000 on PyPI
gdrive-fsspecProvides a fsspec-compatible filesystem…
permissive · top 15,000 on PyPI
webdav4A WebDAV client library that provides a Python…
permissive · top 15,000 on PyPI
fsspecfsspec provides a unified filesystem interface…
unclear · top 100 on PyPI
dvc-sshAdds SSH remote storage support to DVC,…
permissive · top 15,000 on PyPI
sftprettyA Python3 wrapper around paramiko that…
permissive · top 15,000 on PyPI
ossfsOSSFS provides a Python interface to Alibaba…
permissive · top 15,000 on PyPI