Skip to content

philipdaoud/sftp-neo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ SFTP Neo

Sync your code to any server without leaving VS Code.

πŸ”’ More Secure Β· πŸ“¦ Updated Libraries Β· ⭐ More Features

VS Code Marketplace GitHub Release License

🍴 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.


πŸŽ‰ What's New in v3.0 β€” Remote File Backups

πŸ›‘οΈ Never Lose a File Again

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

⚑ Jump to Backup Setup β†’


πŸ“‘ Quick Links

✨ Features Β· ⚑ Quick Start Β· πŸ”§ Config Examples Β· πŸ” Security Β· πŸ› Debug Β· ❓ FAQ


✨ Features

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

⚑ Quick Start

1. Install

Grab it from the VS Code Marketplace or install the .vsix from Releases.

2. Configure

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 to null) β€” you'll be prompted once and can save it securely to your OS keychain. See πŸ” Security.

3. Go!

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.


πŸ”§ Config Examples

🎭 Profiles

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.

πŸ“‚ Multiple Contexts

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"
  }
]

πŸ”— Connection Hopping

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.


πŸ” Security

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:

  1. Set "password": null (or omit it) in sftp.json:
    {
      "host": "example.com",
      "username": "root",
      "password": null,
      "remotePath": "/var/www"
    }
  2. Connect β€” you'll be prompted for the password.
  3. Click "Save password to Secret Storage".
  4. Future connections are automatic & encrypted.

The same works for private key passphrase.

🧹 Manage saved credentials anytime with SFTP: Delete Saved Password.


πŸ–₯️ Remote Explorer

Browse your remote server directly in the VS Code sidebar.

Remote Explorer Preview

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.


πŸ›‘οΈ Remote File Backups

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.

πŸš€ How It Works

Before Upload                    After Upload
─────────────────                ─────────────────
remote/index.php                 remote/index.php  ← new content
                                 remote/.vsftp-backup/
                                   └─ index.php.20260612194215007.bak  ← old content

βš™οΈ Configuration

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.

πŸ“‚ Using the Remote Backups Panel

  1. Enable backups in your sftp.json (see configuration above).
  2. Upload or sync a file β€” a backup is created automatically before the overwrite.
  3. Click any file in the Remote Explorer panel.
  4. 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.

πŸ”’ Safety Guarantees

  • 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 versions limit 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.

πŸ› Debug

Need to troubleshoot?

  1. Open Settings (Ctrl+, / Cmd+,).
  2. Search for sftp.debug and set it to true.
  3. Reload VS Code.
  4. View logs in Output β†’ SFTP.

❓ FAQ

See FAQ.md for common questions and solutions.


Made with β˜• & πŸ› squashing by Philip Daoud

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors