Download

Guides

VS Code SFTP Extension Not Working? 8 Fixes

Why the VS Code SFTP extension stops uploading or connecting, how to find the cause in the debug log, and what to use if it still fails.

Short answer

Most VS Code SFTP problems come from the configuration, not the server. Open the project folder (not a single file), keep sftp.json in the .vscode folder, set uploadOnSave to true, match the protocol and port to your hosting panel, and use the full remotePath. Remove other SFTP extensions, then turn on the debug log and read the error in the Output panel. If the extension still fails, use WinSCP or an editor with SFTP built in.

You save a file in Visual Studio Code, and nothing reaches the server. Or the extension says it cannot connect, although FileZilla or WinSCP connects fine with the same login. This guide goes through the causes we see most often, in the order worth checking.

It is about the SFTP extension maintained by Natizyskunk, the most popular one (about 1.6 million installs on the VS Code Marketplace in December 2026). It continues the original liximomo extension, which is no longer maintained. Most fixes also apply to other forks.

Before you start: is it the extension or the server?

Connect to the same server with a separate client such as WinSCP, using the same host, port, username and password or key.

  • WinSCP fails too: the problem is the login, the port or the hosting plan. Fix that first in your hosting panel.
  • WinSCP works: the problem is in VS Code. Continue with the fixes below.

This one test saves a lot of guessing.

Publishing in Spider V6: the FTP, SFTP and WebDAV client built into the editor
Publishing in Spider V6: the FTP, SFTP and WebDAV client built into the editor

1. Open the folder, not a single file

The extension reads its settings from .vscode/sftp.json in the workspace folder. If you open a single file (for example by double-clicking it in Explorer), there is no workspace, so there is no configuration to read.

Use File > Open Folder and open the root folder of your project. Then run SFTP: Config from the Command Palette (Ctrl+Shift+P). It creates sftp.json in the right place if it does not exist yet.

If you use a multi-root workspace, each root folder needs its own .vscode/sftp.json, or you need the extension’s context setting to point at the right subfolder.

2. Turn on uploadOnSave

The most common complaint is “it connects, but saving does not upload”. Check that the configuration contains:

"uploadOnSave": true

If the setting is missing or false, saving only changes the local file. You can still upload by hand with SFTP: Upload Active File, which is a good test: if the manual upload works, the connection is fine and only the save trigger is off.

3. Match the protocol and the port

The protocol value must match what your host offers:

Your hosting panel saysIn sftp.json
SFTP or SSH, port 22 or a custom port"protocol": "sftp" and that "port"
FTPS (FTP with TLS)"protocol": "ftp", "secure": true
FTP only"protocol": "ftp", port 21

SFTP on port 21 will not work, and neither will FTP on port 22. Many shared hosts use a custom SFTP port (Hostinger uses 65002, for example), so copy the port from the panel rather than assuming 22. And if your plan has no SSH access at all, SFTP will not work whatever you set: use FTPS instead.

4. Use the full remotePath

remotePath is the folder on the server that matches the root of your local project. Common mistakes:

  • Uploading to the home folder instead of the web root, so the files land outside public_html and the site does not change.
  • Uploading one level too deep, which creates public_html/public_html/....
  • A relative path. Use the absolute path the server shows you, for example /home/username/public_html.

To find it, connect with WinSCP, open the web root and copy the path from the address bar.

5. Remove duplicate SFTP extensions

If the old liximomo extension, the Natizyskunk fork and another FTP extension are all installed, they can react to the same command or the same save. The result is double uploads, odd errors or nothing at all.

Open the Extensions view, search for “sftp” and “ftp”, and keep only one. Reload VS Code afterwards.

6. Check what ignore and watcher do

The ignore list stops matching files from being uploaded. A pattern such as **/*.php added by mistake, or a copied list that excludes your build folder, makes uploads silently skip files.

The watcher settings upload files that change outside the editor, for example files written by a build tool. Without watcher, those files are not uploaded on save, because you did not save them in VS Code.

7. Authentication and host key errors

Wrong password or key. If you use a private key, privateKeyPath must point to a key file the extension can read. Keys created by PuTTY in .ppk format may need converting to OpenSSH format with PuTTYgen first. If the key has a passphrase, set passphrase as well.

Host key or algorithm errors. Some older servers only offer outdated key types or algorithms, which modern SSH libraries refuse. If WinSCP connects but warns about an old algorithm, ask your host whether the server can be updated. Do not weaken security settings on your side to get around it.

“Host key has changed”. A changed key on a server you already use can mean your account moved to new hardware. It can also mean something worse. Ask your host before you accept it.

8. Read the debug log

When none of the above helps, look at the actual error. In VS Code settings (settings.json) add:

"sftp.debug": true

Reload the window, repeat the upload, then open View > Output and choose sftp in the drop-down. The log shows the connection steps and the exact error, such as a refused connection, a timeout, an authentication failure or a missing folder. Search for that message together with “vscode-sftp” in the project’s GitHub issues.

Turn debug off when you are done, because the log can contain server paths.

A note on the extension’s maintenance

The extension is free and widely used, but it depends on volunteer time. In its README, the maintainer wrote in March 2025 that they had not been able to work on the project for a long time, and recommended version 1.16.4 as the latest stable release. In December 2026 the GitHub repository listed about 220 open issues.

That does not mean you should stop using it. It does mean that a bug you hit may not be fixed soon, so it is worth knowing an alternative.

What about Remote - SSH?

Microsoft’s Remote - SSH extension is often suggested instead. It is excellent, but it works differently: it needs a full SSH login on the server and installs VS Code Server there, on a supported Linux system with enough memory (the documentation lists at least 1 GB of RAM). Typical shared hosting with SFTP-only access does not meet these requirements. On a VPS you control, Remote - SSH is often the better choice.

Alternatives if the extension keeps failing

OptionCostGood forWatch out for
WinSCP + VS CodeFreeKeeping VS Code as your editorTwo programs; WinSCP uploads the file when you save it in its editor
Remote - SSHFreeA VPS with full SSH accessNot for SFTP-only shared hosting
Editor with SFTP built in (Spider V6)Free basic version, Premium paidEditing and publishing in one window, no extensionsWindows only

Our own editor, Spider V6, has an SFTP, FTP and WebDAV client built in. You set up the server in a dialog instead of a JSON file. It adds a file queue and synchronization between the local and remote versions of a project. It runs on Windows 10 and 11. The free basic version (private, non-commercial use) works with one open document and one server connection. Editing files directly on the server, syncing folders and working with several servers need Premium, $19.95 per year or $34.95 perpetual (VAT included), after a 7-day trial. If you are happy with VS Code and the extension works after the fixes above, there is no reason to switch.

More in the Spider V6 documentation: FTP, SFTP and WebDAV server settings, FTP, SFTP and WebDAV file queue.

Frequently asked questions

Why does the VS Code SFTP extension not upload on save?

Usually uploadOnSave is not set to true, the folder was opened as a single file so sftp.json is not loaded, or the file matches a pattern in ignore. Try SFTP: Upload Active File: if that works, only the save trigger is the problem.

Where should sftp.json be?

In a .vscode folder at the root of the folder you opened in VS Code, so the path is .vscode/sftp.json. Run SFTP: Config from the Command Palette to create it there.

Can the VS Code SFTP extension use FTP or FTPS?

Yes. Set "protocol": "ftp" for FTP. For FTPS add "secure": true. Use SFTP whenever your host offers it, because plain FTP sends your password unencrypted.

Is there a VS Code SFTP extension that works without configuration files?

The popular SFTP extensions are configured with a JSON file. If you prefer dialogs, use a separate client such as WinSCP, or an editor with SFTP built in.