Skip to content
github-actions[bot] edited this page Nov 11, 2026 · 3 revisions

How do I upload the contents of a folder, but not the folder itself?

Set context to that folder (e.g. "context": "./build") — its contents then map directly to remotePath. Full example: Uploading a folder's contents without the folder itself.

How can I upload files as root?

A community workaround (may not work everywhere — see liximomo/vscode-sftp#559) is:

"sshCustomParams": "sudo su -;"

How do I sync both ways automatically, without any user interaction?

Use a watcher on **/* with autoUpload/autoDelete plus syncOption.delete — full config in Two-way automatic sync with the watcher. This also keeps the server updated when Git changes files (branch checkout, revert).

Why don't I see dotfiles/hidden files in the Remote Explorer?

Often a server-side listing setting. With proftpd, edit proftpd.conf (commonly /etc/proftpd.conf, /etc/proftpd/proftpd.conf, /usr/local/etc/proftpd.conf, or /usr/local/etc/proftpd/proftpd.conf) and change ListOptions "-l" to ListOptions "-la":

<Global>
ListOptions "-la"
</Global>

Files on my IBM z/OS (mainframe) FTP server come through garbled

SFTPresso transfers FTP files in binary mode, byte for byte. z/OS only converts text between EBCDIC and ASCII in ASCII mode, so set ftpTransferType to "ascii":

{ "protocol": "ftp", "ftpTransferType": "ascii" }

ASCII mode applies to every file on that connection, so keep binary files (images, archives) out of it with ignore or a separate context config.

Do I have to store my password in sftp.json?

No — leave password out and you'll be prompted on connect, with an offer to remember the password in VS Code's secret storage. You can also save it up front with SFTP: Save Password (see Storing passwords securely). Better yet, use key-based auth (see Best Practices).

What do the "Connection refused" / "Connection timed out" / "Host not found" / "Authentication failed" messages mean?

See SSH connection error messages.

Can I edit files directly in the Remote Explorer?

Yes. Opening a file in the Remote Explorer edits it on the server: saving writes it straight back, with no local copy. If the file changed on the server since you opened it, VS Code asks before overwriting. To work on a local copy instead, use SFTP: Edit in Local, or set sftp.downloadWhenOpenInRemoteExplorer to make that the default. Set sftp.openRemoteFilesReadOnly to open remote files read-only. See Using the Remote Explorer.

Sync copies files in the wrong direction / re-uploads unchanged files.

Sync is timestamp-based; correct clock/timezone differences with remoteTimeOffsetInHours.

Transfers randomly fail on my shared host.

Lower concurrency (some servers cap simultaneous operations) and/or set limitOpenFilesOnRemote if the server runs out of file descriptors.

Why was my rename/move refused?

Renaming refuses rather than clobbering or guessing: the destination already exists (delete it first, or pick a different name), the new path falls outside remotePath, or it would move a folder into its own subfolder. Nothing is touched when it's refused. See Renaming and moving files.

Clone this wiki locally