FTP/SSH Bundle for TextMate

Since you are reading this you probably know there is no build-in FTP/SSH support in TextMate.
This bundle tries to work around this a little bit. Not satisfied by the perfomance of solutions like Macfusion or Expandrive I choosed to develop my own solution.

Using the FTP/SSH bundle you may be able to download (reload) and upload files to a remote host using FTP or SSH. You always work on a local copy of the remote files. Remote files must be downloaded first by another method and manually added to your TextMate Project file. You may use the FTP/SSH bundle for TextMate Projects or just single files.


This Bundle manipulates and overwrites local and remote files without prompting. Although I took care when creating this bundle I don’t give a guarantee for its proper function. Use it on your own risk.

Remote Connection settings

The FTP/SSH bundle get its remote connection settings from a file called .ftpssh_settings. This file must be located in the same directory where your TextMate Project file is saved. If you don’t use a TextMate Project but single files you must place the .ftpssh_settings file at the same directory level where your single files are saved.

Use the FTP/SSH command Remote Connection Settings… to enter connection parameters for remote FTP or SSH servers. It will take care of where to save .ftpssh_settings.

These are the parameters to be used in .ftpssh_settings or entered using the Remote Connection Settings… command. All except cli_options and password (FTP only) are mandantory.

  • protocol: SSH or FTP
  • user: Login name on the remote host
  • password: Password to login on the remote host (FTP only)
  • host: Name or IP of the remote host
  • path: Relative (to $HOME) or absolute path of your project on the remote host
  • cli_options: Command line options/arguments for /usr/bin/ftp or /usr/bin/scp (optional)

Note: Because SSH does not support passwords on the command line it only works if you set up passwordless authentication like Public key authentication. See the SSH manual for how to do this.
Note 2: Passwords for FTP are saved in clear text. To secure it a little bit the .ftpssh_settings file will be set to file mode 0600 (read/write only by the owner).

Format of .ftpssh_settings file

Example .ftpssh_settings for a FTP connection:

protocol = ftp  
user = username  
password = password  
host = myserver.com  
path = path/to/remote_project  
cli_options =  

Example .ftpssh_settings for a SSH connection:

protocol = ssh  
user = username  
password =  
host = myserver.com  
path = path/to/remote_project  
cli_options = -C  

(Compression of data transfer enabled by cli_options = -C)

Using FTP/SSH commands

The FTP/SSH bundle commands works on the current window (open file) only. It’s not possible to reload or save all files in a TextMate Project at once.

  • Reload Remote File
    To get the latest revision of a remote file use this command. This will overwrite the local file.
    Shortcut: alt-R

  • Upload File
    Save local changes to the remote host (and the local file). This will overwrite the remote file.
    Shortcut: alt-S

  • Remote Connection Settings…
    Edit and save remote connection parameters for remote FTP or SSH servers.

  • Help
    Show Help.

There is no fancy response sign (spinning wheel, progress bar) during data transfer. After success or failure of the commands you get a message as tool tip or - if installed - via Growlnotify.




  • Reload all files of a TextMate Project at once
  • Upload all changed files of a TextMate Project at once
  • Show diffs between local and remote files


v2.3 (2008-05-13)

  • FIXED: Error when loading connection setting parameters which contains non-alphanumeric characters. (Thanks to Jonas Grau).
  • FIXED: Chopping off the first character from the file path in some circumstances will not occure anymore. (Thanks Jason).
  • FIXED: All error output from /usr/bin/ftp and /usr/bin/scp is catched
  • CHANGED: Uploading and reloading of files is more robust because (1) the local file will be addressed using it’s absolute path and (2) the arguments to the SCP and FTP commands are escaped for all kinds of file or path names (hopefully).
  • CHANGED: In case of error the executed FTP or SCP command line will be displyed for better error checking. (Tip: Go to Bundles > Bundle Editor, open the FTP/SSH Bundle, select the “Upload” or “Reload” command and choose “Create New Document” as Output option. This way you can copy the command line used by the FTP/SSH Bundle and try it in a Terminal Shell.)

v2.2 (2007-12-29)

  • FIXED: Command “Remote Connection Settings…” missing. (Thanks to Russ Brooks).