GERLA.CC

vs code extension · pay what you want

The server
inside the editor.

Remote SFTP/FTP brings remote servers inside Visual Studio Code: SFTP over SSH, FTP and FTPS, the folder tree in the sidebar, a terminal on the same connection as the files, search executed on the server. Passwords live in the system keychain, not in a file inside your project.

151 KB · requires VS Code 1.85 or later · tested on macOS and Linux · pay what you want, commercial use included

L'albero delle cartelle remote nella barra laterale di VS Code, con il file aperto nell'editor e il terminale remoto in basso index.php · produzione SFTP / FTP produzione ▾ /var/www ▾ html index.php config.php .htaccess ▸ assets ▸ logs staging OUTLINE ƒ bootstrap() ƒ render() ƒ handle() 123 456 789 rsftp:// TERMINALE SSH · produzione $ grep -rIn "DB_HOST" . ./config.php:14: $

the remote tree in the sidebar, the file opened straight from the server, the shell on the same connection.

Why I wrote it

For years I've been moving files onto remote servers while developing, and for years it's been the same scene: you open the file with an FTP client, edit it in an editor that isn't the one you're using for the project, save, reload. Or you install one of the VS Code extensions that do the same thing, and discover that your production password ended up in clear text inside a JSON file in the project folder, one "git add ." away from the repository.

I wrote Remote SFTP/FTP to get that problem off my desk, and since it works, I'm giving it away for free.

The server becomes part of the editor

The idea is simple. You configure the connection once, SFTP over SSH or FTP and FTPS, and the remote folder tree appears in the sidebar. You click a file, it opens. You edit it, hit Save, and the file is written back to the server. There's no local copy that two days later you can't tell is newer or older than the remote one, and there's no sync job to launch and remember. A remote folder can even become the workspace root, and from there you work on it exactly like a project on your own disk.

VS Codeeditor, tree, search
→
one connectionSFTP / SSH
→
files + shell + grepon the server
→
remote servera single login

Terminal, search, drag and drop

On SSH connections there's also the remote terminal, and here's a detail I care about: the shell opens on the same connection already used for the files. No second login, no second password. If you launch the command from a folder in the tree, the shell starts right there.

The feature I use most, though, is search. Looking for a string inside a project on a remote server is usually a chore: either you download everything, or you log in over SSH and make do with grep. Here you pick which folder to start from and what to look for, and if the SSH account has a shell the search runs directly on the server with grep and find. Only the list of results crosses the network, not the files. You click a result and the file opens at the right line. On FTP connections, where no shell exists, the extension scans the folders from the client: slower, but it works.

Below the connections tree there's also an outline of the open file: classes, functions and methods, one click to jump into them. It works on remote files whose language has no active language server too, thanks to a fallback textual scan.

Then there's the whole drag and drop side. Files and folders from your system file manager onto a remote folder to upload them, items inside the remote tree to move them on the server without the data travelling through your computer, and even between two different connections to copy from one server to another: in that case the data goes from one stream into the other without touching disk or memory, so a few-hundred-megabyte file is not a problem.

If you already use other tools

You don't have to reconfigure anything by hand: there's a command that reads connections from your ~/.ssh/config, from the projects' sftp.json files and from another widespread extension, shows you what it found and imports the ones you pick, merging duplicates. Passwords and passphrases it finds go into the keychain, not into the configuration.

Servers reachable only through a bastion are supported too, and if the connection drops the operation in flight is retried on its own: a save or a transfer survives a network blip with no error dialogs.

The three things I'm proudest of

You can't see them, and they're the reason I wrote it.

credentials

In the keychain, not in the project

Passwords live in the system keychain, through VS Code's secret storage. Not in a file inside the project folder, so not in a commit by accident.

known_hosts

The server key gets verified

Just like ssh does: if the host is new it shows you the fingerprint and asks; if the key changed it warns you explicitly, because that can be a legitimate rotation or someone in the middle.

saving

No silent overwrites

If a colleague touched that file after you opened it, the save stops before writing: you can compare the two versions and decide for yourself.

A few limits, said up front

How to install

On macOS and Linux the procedure is the same, because this isn't an operating system application: it lives inside VS Code. There's no installer to download, and no other software needed. Only the key changes: Cmd on the Mac, Ctrl on Linux.

01 · download

Get the .vsix file

The package is remote-sftp-ftp-0.1.0.vsix, and you download it from this page.

Download the .vsix (v0.1.0)

02 · install

Install from VSIX

Open VS Code and go to the Extensions panel, the one with the squares icon in the sidebar, or press Cmd+Shift+X on macOS and Ctrl+Shift+X on Linux. At the top right of that panel there's a three-dots menu: open it and pick "Install from VSIX...", then select the file you just downloaded.

If you prefer the terminal, there's the short way:

code --install-extension remote-sftp-ftp-0.1.0.vsix

On Linux the code command is usually already available. On macOS you enable it once from inside VS Code: Cmd+Shift+P, then "Shell Command: Install 'code' command in PATH".

03 · reload

Reload the window and connect

Now reload the window: Cmd+Shift+P on macOS or Ctrl+Shift+P on Linux, then type "Reload Window" and hit enter. A new icon appears in the sidebar, SFTP / FTP. Click it and you'll find the link to create your first connection.

You need VS Code 1.85 or later. To update in future, just repeat the same procedure with the new file: the previous version is replaced, with no duplicates and without losing your configured connections, which stay in VS Code's settings and in the system keychain.

Licence

Pay what you want: the download is free and, if you like, you leave what feels fair. Any use is fine, commercial and inside companies included, with no registration and no limits on time or seats. It is not open source. The only thing I ask is that you don't redistribute the file elsewhere: link this page, so whoever installs it always gets the current version.

If you try it and something doesn't work, write to me.

remote-sftp-ftp-0.1.0.vsix

151 KB · VS Code 1.85+ · macOS and Linux
sha256 f89c20fa e9da3ea0 897ed20f bb047e1c cb672363 e9c03f75 d7fa83ff 73f5b8d2

Download