Skip to main content
A directory on a remote server becomes a local-looking tree of files, read and written over SFTP. It works from Python and Node.

Setup

The server needs SFTP turned on and an SSH account with access to the directory. Create a key and install it on the server, then check that SFTP answers:
  • private_key takes the key’s own text in place of identity_file’s path, so a credential pointer can read it from a secret store.
  • Without identity_file or private_key, the SSH agent and the default keys in ~/.ssh are tried. With identity_file and its public key beside it (<path>.pub), the agent offers only that key, as OpenSSH’s IdentitiesOnly does, so other keys in the agent cannot use up the server’s login attempts. With private_key set, the SSH agent is not tried, nor, in Python, Kerberos. password works too, but a key is preferred.

Connect

workspace.yaml

Layout

  • /remote/logs/app.log is /srv/data/logs/app.log on the server.
  • In Python, host also matches a ~/.ssh/config alias, and its settings apply; ssh_config: false leaves the file unread.
  • Host keys are checked only with known_hosts set, against the keys that known_hosts file lists for the server; an unknown or changed key refuses the connection. ssh-keyscan -p <port> <host> >> <file> adds a server’s keys to a file; it trusts whatever key answers, so run it over a network you trust or compare the fingerprint with ssh-keygen -lf on the server.

Sample runs

mode: write allows changes, as far as the SSH account’s permissions allow. To run programs on the server, use the SSH machine.

SDK guides

Python

Every config field, the VFS.md and write support.

TypeScript

Every config field, the VFS.md and write support.