Files
tty7/docs/remote/sftp.mdx
T
l0ng-ai d474e4ade3 feat(sftp): open the Files panel at the shell's current directory
Reopening the SFTP panel went back to the last browsed folder; a fresh
open now prefers the pane shell's cwd, falling back to the last browsed
folder, then the login directory. Following a pane switch with the panel
still open keeps each pane's last browsed folder.

Also pin the test config dir in the sftp gpui harness so filtered runs
do not trip the real-config guard, and fix docs/remote/sftp.mdx, which
said the panel opens on the remote home directory.

Closes #826
2026-09-23 15:03:04 +08:00

60 lines
2.3 KiB
Plaintext

---
title: "SFTP"
description: "A file browser for the machine on the other end of the connection."
---
While a pane is in an SSH session, *SSH: Remote Files* (command palette) slides
a file panel in over it. It is a real SFTP client on the same connection — no
second login, no second password.
<Frame caption="Placeholder — screenshot: the SFTP panel over a pane, with a transfer in progress">
<img src="/images/placeholder.svg" alt="The tty7 SFTP panel" />
</Frame>
## Browsing
The panel opens wherever the pane's shell currently is. If tty7 cannot tell
(the remote shell does not report its directory), it opens on the last folder
you browsed in that pane, or on the remote home directory the first time.
Switching between panes with the panel open brings each pane back to the folder
you left it on. **Go to Shell Directory** in the overflow menu jumps back to the
shell's directory at any time.
Right-click a row for **Edit** (**Open** on a directory), **Download**,
**Follow Symlink**, **Rename**, **chmod…**, and delete. The overflow menu adds
**New Folder**, **New File**, **Upload…**, and **Refresh**.
## Editing
Click a text file and it opens in the [built-in
editor](/window/side-panel), the same gesture as the local file tree; saving
writes straight back over the same connection. Files the editor cannot hold —
binary, or over its 4 MB limit — say so instead; right-click → **Download**
for those.
## Transferring
| Direction | How |
|---|---|
| Download | Right-click → **Download** |
| Upload | **Upload…**, or drag files into the panel |
Uploads are written under a temporary name and renamed into place at the end, so
a half-finished file never looks like a finished one. A name that is already
taken asks before replacing.
**Transfer History** in the overflow menu shows every transfer with its
progress, and lets you cancel one in flight. The panel header summarises what is
happening — *"2 transferring · 64%"*.
## Permissions
**chmod…** takes an octal mode (`755`, `600`). The current mode is shown in the
row's editor before you change it.
<Tip>
For files in a [remote workspace](/remote/workspaces) you can often skip SFTP
entirely — the Files panel reads and writes across the link directly, and the
built-in editor saves back to the remote machine.
</Tip>