Sync your code to any server without leaving VS Code.
π More Secure Β· π¦ Updated Libraries Β· β More Features
π΄ Forked & Modernized from Natizyskunk/vscode-sftp, originally based on the abandoned liximomo/vscode-sftp. Updated dependencies, new features, and full compatibility with the latest VS Code APIs.
Automatic versioned backups on every upload & sync. Before any remote file is overwritten, SFTP Neo saves a copy on the server with a timestamp. Browse, restore, or delete old versions directly from VS Code.
| π Automatic Backups | Every upload/sync creates a timestamped backup on the remote server |
| ποΈ Configurable Retention | Set how many versions to keep (versions: 5) β old ones auto-prune |
| π Context-Aware Panel | Click any file in Remote Explorer β see its backup history instantly |
| π One-Click Restore | Right-click any backup to restore it to the live remote file |
| π Failsafe Design | Backup failures never block your upload β your code always goes live |
β¨ Features Β· β‘ Quick Start Β· π§ Config Examples Β· π Security Β· π Debug Β· β FAQ
| Feature | Description |
|---|---|
| π Remote Explorer | Browse & manage remote files like a local filesystem |
| β¬οΈβ¬οΈ Upload / Download | Single files, folders, or entire projects |
| π Sync | Bi-directional or one-way directory sync |
| πΎ Upload on Save | Auto-push changes as you code |
| ποΈ File Watcher | Auto-upload on external file changes |
| π Profiles | Switch between dev / staging / prod in one click |
| π Secure Storage | Passwords saved in your OS keychain β never in sftp.json |
| π Multi-Context | Sync different local folders to different servers |
| π SSH Hopping | Jump through bastion hosts to reach internal servers |
| π₯οΈ SSH Terminal | Open an SSH connection straight from the sidebar |
| π‘οΈ Remote Backups | Automatic versioned backups before every upload with restore & prune |
Grab it from the VS Code Marketplace or install the .vsix from Releases.
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run:
SFTP: Config
A sftp.json file is created under .vscode. Fill in your server details:
{
"name": "My Server",
"host": "example.com",
"protocol": "sftp",
"port": 22,
"username": "root",
"remotePath": "/var/www/html",
"uploadOnSave": true
}π‘ No password? Leave
"password"out (or set it tonull) β you'll be prompted once and can save it securely to your OS keychain. See π Security.
| Action | Command Palette |
|---|---|
| Download project | SFTP: Download Project |
| Upload current file | SFTP: Upload Active File |
| Sync local β remote | SFTP: Sync Local -> Remote |
| Browse remote | View: Show SFTP (sidebar) |
Right-click any file or folder in the Explorer for quick upload / download / diff options.
Switch between environments on the fly:
{
"username": "deploy",
"remotePath": "/app",
"profiles": {
"dev": { "host": "dev.example.com", "uploadOnSave": true },
"prod": { "host": "prod.example.com", "uploadOnSave": false }
},
"defaultProfile": "dev"
}Use SFTP: Set Profile to switch.
Sync different parts of your project to different places:
[
{
"name": "Frontend",
"context": "client/dist",
"host": "cdn.example.com",
"remotePath": "/static"
},
{
"name": "Backend",
"context": "server",
"host": "api.example.com",
"remotePath": "/var/api"
}
]Reach a server through a bastion host:
{
"name": "Target",
"host": "bastion.example.com",
"username": "jumpuser",
"privateKeyPath": "~/.ssh/id_rsa",
"hop": {
"host": "target.internal",
"username": "appuser",
"privateKeyPath": "~/.ssh/id_rsa"
}
}π For the full list of options check the Wiki.
SFTP Neo stores passwords & passphrases in your OS credential store (macOS Keychain, Windows Credential Manager, Linux libsecret) via VS Code's Secret Storage API β so your sftp.json stays clean and commit-safe.
How to use it:
- Set
"password": null(or omit it) insftp.json:{ "host": "example.com", "username": "root", "password": null, "remotePath": "/var/www" } - Connect β you'll be prompted for the password.
- Click "Save password to Secret Storage".
- Future connections are automatic & encrypted.
The same works for private key passphrase.
π§Ή Manage saved credentials anytime with
SFTP: Delete Saved Password.
Browse your remote server directly in the VS Code sidebar.
Open it via:
- Command Palette β
View: Show SFTP - Or click the SFTP icon in the Activity Bar
Select multiple files with Ctrl/Shift to download or upload in batches.
Protect your production files. Every upload is reversible.
Before any remote file is overwritten by an upload or sync-to-remote operation, SFTP Neo automatically creates a timestamped backup copy on the server. Browse, restore, or delete backup versions without leaving VS Code.
Before Upload After Upload
βββββββββββββββββ βββββββββββββββββ
remote/index.php remote/index.php β new content
remote/.vsftp-backup/
ββ index.php.20260612194215007.bak β old content
Add the backup object to your .vscode/sftp.json:
{
"name": "Production",
"host": "example.com",
"protocol": "sftp",
"port": 22,
"username": "root",
"remotePath": "/var/www/html",
"uploadOnSave": true,
"backup": {
"enabled": true,
"folder": ".vsftp-backup",
"versions": 5
}
}| Option | Type | Default | Description |
|---|---|---|---|
backup.enabled |
boolean |
false |
Master switch. Set to true to enable backups. |
backup.folder |
string |
".vscode/sftp-backup" |
Remote folder where backups are stored. Resolved relative to remotePath. |
backup.versions |
number |
5 |
Maximum number of backup versions to keep per file. Set to 0 to disable backups even when enabled is true. |
π‘ Tip: The backup folder is automatically excluded from sync operations and the Remote Explorer β you never have to worry about backups being uploaded or cluttering your file tree.
- Enable backups in your
sftp.json(see configuration above). - Upload or sync a file β a backup is created automatically before the overwrite.
- Click any file in the Remote Explorer panel.
- The Remote Backups panel updates to show all backup versions for that file, sorted newest β oldest.
| Action | How |
|---|---|
| π Restore | Right-click a backup version β Restore Backup. The current live file is backed up first, then replaced. |
| ποΈ Delete | Right-click a backup version β Delete Backup. |
| ποΈ Preview | Click any backup version to open it in a read-only preview without downloading. |
- Upload never blocked: If a backup fails for any reason, the upload still proceeds. Your code always goes live.
- Auto-pruning: Old backups beyond your
versionslimit are cleaned up automatically after each upload. - No local clutter: Backups live on the remote server, not your machine. The backup folder is invisible to sync.
- Context-aware: The panel only shows backups for the file you have selected in Remote Explorer.
Need to troubleshoot?
- Open Settings (
Ctrl+,/Cmd+,). - Search for
sftp.debugand set it totrue. - Reload VS Code.
- View logs in Output β SFTP.
See FAQ.md for common questions and solutions.
Made with β & π squashing by Philip Daoud
