ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Remote​Sync

by NeloGH ST4

No description provided

Labels ftp, sftp, sync, remote

Details

Installs

  • Total 615
  • Win 330
  • Mac 215
  • Linux 70
Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13
Windows 0 0 5 0 0 1 0 1 2 1 4 4 1 4 3 2 1 3 1 0 1 0 1 2 0 2 0 0 0 2 2 0 1 0 0 5 3 3 1 0 2 1 0 1 1 0
Mac 0 3 0 0 0 1 1 0 1 1 2 0 0 1 1 1 1 0 3 0 0 1 1 3 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 3 1
Linux 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 2 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

RemoteSync

A Sublime Text 4 plugin for syncing files to remote servers via SFTP, FTP, FTPS, and SCP.

Features

  • Upload on save — files sync automatically when you hit Ctrl+S
  • Batch upload/download entire folders with parallel connections
  • Interactive remote file browser
  • Diff local vs remote file before overwriting
  • Multiple configs — one per subfolder, each with its own server
  • Run commands on the server after each upload (e.g. sudo systemctl reload nginx)
  • Run local commands before upload (e.g. npm run build)
  • Connection pooling with keepalive — no reconnect on every save
  • Output panel with animated progress, auto-hides after operations finish
  • JSON config with comment support (// comments allowed)
  • Auto-converts PuTTY .ppk keys to OpenSSH format

Installation

Via Package Control (recommended)

  1. Open the Command Palette: Ctrl+Shift+P
  2. Run Package Control: Install Package
  3. Search for RemoteSync and install

Manual

Clone or download this repo into your Sublime Text Packages/ folder:

Packages/RemoteSync/

Requirements

  • Sublime Text 4
  • OpenSSH (sftp, scp, ssh) — included on macOS/Linux; on Windows install Git for Windows or enable the optional OpenSSH feature

Setup

Right-click any folder in the sidebar and select RemoteSync → Setup Remote Server…

A remote-sync-config.json file will be created. Fill in your server details:

{
    "type": "sftp",
    "host": "your-server.com",
    "user": "username",
    "password": "password",
    "remote_path": "/var/www/mysite/",
    "upload_on_save": true
}

Multiple servers

Place a separate remote-sync-config.json in each subfolder. Files automatically use the nearest config (walking up the tree) when saved.

When the project has more than one config, RemoteSync: - Logs a one-time notice listing every config and which folders they cover. - Shows the absolute remote path in the output panel for every upload/download, so you can see exactly where each file lands.

To verify which config applies to a file, right-click it → RemoteSync → Show Effective Config (also in the command palette). It shows the resolved config, the local→remote mapping, and any nested configs.

Single destination? Set "inherit_root_only": true in the root config to ignore all nested configs and always use the root.

Config inheritance

A nested config can share the parent's server and override only what changes. Set "inherit_parent": true and define just the differing keys:

// root: full credentials
{ "host": "h", "user": "u", "password": "p", "remote_path": "/var/www/site" }

// themes/custom/remote-sync-config.json — same server, different folder
{ "inherit_parent": true, "remote_path": "/var/www/site/themes/custom" }

The nested config inherits host, user, password, etc. from the nearest config above it. Change the password once in the root and every inheriting config follows.

Without inherit_parent, a nested config is fully independent — use this when the subfolder targets a completely different server.

Configuration

Key Default Description
type sftp Protocol: sftp, ftp, ftps, scp
host — Server hostname or IP
user — Login username
password — Login password (or use ssh_key_file)
ssh_key_file — Path to private key (~/.ssh/id_rsa)
sftp_only auto Account has no shell (SFTP jail); detected automatically
port 22 Server port
remote_path — Base remote directory
upload_on_save false Auto-upload on every save
auto_create_dirs false Create remote dirs if missing
parallel_connections 4 Workers for folder operations (1–8)
retry_count 0 Auto-retry failed transfers
keepalive 0 Seconds between keepalive pings
pre_upload_command — Local command before upload
post_upload_command — Remote command after upload
ignore_regexes [] Patterns to skip (e.g. "\\.git/")
exclude_extensions [] Extensions to skip (e.g. ".log")
max_file_size_mb — Skip files larger than this

SFTP-only accounts (no shell)

Many hosts jail SFTP users (ForceCommand internal-sftp, chroot). RemoteSync detects this on connect and switches to pure-SFTP mode: browsing, upload, download, rename, delete, folder creation and permission changes all run over SFTP. Folder downloads use a listing-based scan instead of find/rsync. post_upload_command is skipped, since it needs a remote shell. Set "sftp_only": true to skip the detection probe.

FTPS

FTPS reuses the TLS session of the control connection on every data connection. That makes it work with servers that require it (vsftpd require_ssl_reuse=YES, FileZilla Server), which would otherwise fail with 522 SSL connection failed: session reuse required.

Plugin Settings

Open via Preferences → Package Settings → RemoteSync → Settings:

{
    "show_panel_on_error": true,
    "auto_hide_panel": 4,
    "log_operations": true,
    "ssh_bin_dir": ""
}
  • ssh_bin_dir: folder containing the OpenSSH binaries (ssh, sftp, scp, ssh-keygen). Leave empty to auto-detect. When set, binaries are looked up only in this folder, with no fallback. Useful when the system OpenSSH is outdated (e.g. Windows ships 8.1, which can hang when launched from Sublime) or when running from a portable drive: "ssh_bin_dir": "E:/tools/OpenSSH-Win64"
  • auto_hide_panel — seconds before the output panel closes after success (0 = never hide)

Commands

All commands are available via: - Right-click on files/folders in the sidebar - Command Palette (Ctrl+Shift+P) — search “RemoteSync”

Command Description
Upload File Upload current file
Download File Download current file from server
Upload Folder Batch upload entire folder
Download Folder Batch download entire folder
Browse Server Interactive remote file browser
Diff with Remote Compare local vs remote
Rename Local and Remote Rename on both sides
Delete Local and Remote Delete on both sides
Setup Remote Server Create config for selected folder
Edit Server Config Open config for selected path

Disabling the context menu

To disable or customize the context menu:

  • Create a RemoteSync directory inside your Packages directory (find it via Preferences → Browse Packages)
  • In that directory place a Context.sublime-menu file. You can use this package's original menu as a starting point

This copy overrides the original. You can remove the entries you don't want, or use just [] to disable the menu completely.

The same applies to the sidebar menu — use Side Bar.sublime-menu instead.

License

MIT