Skip to content
DuckDB community extension

sshfs

Allows reading and writing files over SSH

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 · SQL
INSTALL sshfs FROM community;
LOAD sshfs FROM community;

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

Authenticate with SSH key file

SQL
-- Install & load the extension

-- Authenticate with SSH key file
CREATE SECRET my_hetzner_storagebox (
    TYPE SSH,
    USERNAME 'user',
    KEY_PATH '/Users/' || getenv('USER') || '/.ssh/storagebox_key',
    PORT 23
    SCOPE 'sshfs://u123456.your-storagebox.de'
);

-- or with password
CREATE SECRET my_server (
  TYPE SSH,
  USERNAME 'user',
  PASSWORD 'password',
  SCOPE 'sshfs://your-server.example.com'
);

-- Write data to remote server
COPY (SELECT * FROM large_table)
TO 'sshfs://your-server.example.com/data.parquet';

-- Read The uploaded parquet file using WebDAV
SELECT * FROM 'sshfs://your-server.example.com/data.parquet';

Provided by midwork-finds-jobs. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

DuckDB sshfs extension enables seamless integration with servers through ssh, allowing users to read from and write to remote file systems directly within DuckDB.

See: https://github.com/midwork-finds-jobs/duckdb-sshfs/blob/main/README.md for more examples and details.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
midwork-finds-jobs/duckdb-sshfs
License
MIT
Maintainers
onnimonni
Written in
C++
Build source
b7ca495c21ea
Build definition
Community descriptor