skillfed

sshfs

SSH Filesystem -- Async SSH/SFTP backend for fsspec

sshfs v2026.8.0 3.0M downloads/30d#2,783 on PyPI89
Permissive license Apache-2.0 Active released

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 sshfs

uv

uv add sshfs

poetry

poetry add sshfs

Installing 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

Development Status :: 4 - BetaProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

sftp filesystem interfacessh file access pythonremote file operationsfsspec ssh backendasync sftp clientssh file system abstraction
sftpasync-ioremote-storage

More Networking packages