Skip to content

Add SFTP/SSH access for pod users #236

@melvincarvalho

Description

@melvincarvalho

Summary

Enable pod users to mount their pod as a local filesystem via SSHFS/SFTP.

Motivation

With --terminal (v0.0.118) users already have shell access. The next step is letting users mount their pod on any computer:

sshfs [email protected]:/ ~/pod/

This turns the pod into a Dropbox/Google Drive replacement — edit files in VS Code, drag and drop in a file manager, cp from terminal. WebSocket notifications mean the browser pane updates in real-time.

Implementation options

Option A: Built-in SFTP server

  • Add --sftp flag to JSS
  • Use a Node.js SSH/SFTP library (e.g. ssh2)
  • Map SFTP operations to the existing storage layer
  • Authenticate via pod credentials (jss passwd)

Option B: Integrate with system SSH

  • jss passwd already manages user credentials
  • Create system users mapped to pod users
  • Chroot each user to their pod directory
  • Use OpenSSH's built-in SFTP subsystem

Option C: WebDAV

  • More portable than SFTP (works natively on Windows/Mac/Linux)
  • JSS already speaks HTTP — WebDAV is a small extension
  • Mount via native OS tools without extra software

User flow

  1. jss passwd alice — set password
  2. User mounts: sshfs alice@server:/ ~/pod/
  3. Files appear as local directory
  4. Edits sync to pod in real-time
  5. Browser pane updates via WebSocket

Builds on

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions