Skip to content

ADR-0009: SSH filesystem ​

Status: Accepted (2026-11-29)

Decision ​

  • The optional ssh-filesystem module is the only generic file access in Ossiframe. It is a narrow exception to two rules: "structured commands through the Core executor" and "no generic file access over IPC".
  • File access is an SFTP subsystem channel opened inside ossiframe-ssh on the server's existing connection. It reuses that connection's authentication and pinned host key and opens no new SSH connection. It sends typed SFTP requests (russh-sftp), never shell commands, and runs as the SSH user without sudo.
  • It is driven only by the user's actions on the Files page. No module, operation, plan, the operation engine or the AI copilot can call it. The module registers no operations, and the copilot's tool allowlist rejects it.
  • The transport is behind cargo features: sftp in ossiframe-ssh, files in ossiframe-desktop, and tauri and write in the module. Write commands exist only in builds with write, and those builds still start each server's file session read-only. Builds without write refuse read/write mode. Doctor never enables any of these features and registers no files_* command; drift tests check this.
  • File writes and managed operations exclude each other through one in-memory per-server registry: an operation cannot start while a file write or upload is active, and a file write cannot start while an operation is claimed or unresolved.
  • Uploads and downloads go through uniquely named, exclusively created temporary files. Finalizing does not overwrite a target unless the user confirmed the replacement.
  • The ~/.ssh subtree, and every ancestor of it, is protected from delete, rename and move, and from being written into.
  • File contents, previews and transfer data are never logged, stored or forwarded.

Consequences ​

  • Changes made on the Files page apply directly as the SSH user. Ossiframe does not track or undo them, and the page says so.
  • The ~/.ssh protection is best-effort and not race-proof. The server can change between the check and the request. A custom AuthorizedKeysFile location is not detected.
  • The operation exclusion covers this app instance only. Another Ossiframe installation is still stopped by the remote operation lock, not by this registry.
  • All other remote execution stays structured and goes through the Core executor.

Released under the MIT License.