February 27, 2006

Transfer files from OS X with Fugu

Author: Lars Noodén

If you're a Mac OS X user who needs to move files securely between home, work, and Web hosts, try Fugu, an open source, graphical front end for SSH File Transfer Protocol (SFTP), Secure Copy (SCP), and Secure Shell (SSH). Fugu uses these three protocols to conduct secure transfers and other communication between computers.

Fugu's graphical user interface is simple enough for beginners to use comfortably, yet it supports more advanced capabilities that experienced SFTP/SCP/SSH users may need. The most visible parts of the program concern secure file transfers between Mac OS X and a remote server, though it also supports more esoteric functions such as tunneling.

Copying files with SFTP

Fugu's default activity is SFTP. It lets you transfer files and perform housekeeping functions such as moving, renaming, and deleting. You can drag items between panes or to and from the desktop, and you can set file permissions. A console option allows you to either send commands or monitor the command-line activity that goes on behind the scenes. An editing shortcut downloads a file, passes it to the default editor configured in Fugu, and uploads the modified file when the editor closes. You can call many common editors this way, including BBEdit, jEdit X, vi, and Emacs, but not TextEdit, which lacks support for the external editor protocol.


SSH is an encrypted replacement for telnet and rsh. SFTP is a file transfer method that uses encryption. SFTP is similar to the venerable File Transfer Protocol (FTP), although the entire session, including the login, is encrypted. However, SFTP is actually a whole new protocol developed by the IETF Secure Shell working group. It is not the same as tunneling old-fashioned FTP over SSH.

SCP is based on Berkeley Software Distribution's (BSD) rcp, but it uses SSH to encrypt the connection. Future development is likely to prioritize SFTP over SCP.

Because SFTP encrypts all data, the load on both the local and remote machines will be high, so use common sense when downloading. You can view comparisons of SFTP vs. SCP online.

Fugu doesn't let you replace the local pane with another remote pane to allow transfers between two remote computers via the local one. Also, you can have only one session active at a time. Because Fugu inherits the limitations of the underlying tools it uses, it can't, for instance, remove remote directories unless they're empty. Error messages from SFTP, SCP, and SSH are passed straight through to users and could be a bit more clear. However, none of these limitations detracts from regular use.

You can download both single and multiple files with SFTP easily, but you can't download directories yet. Instead, Fugu invokes SCP when trying to download a directory, filling in all the values automatically. The main drawback to that workaround is that you must enter the password again if it is not stored already in your keychain, since the SFTP client on the back end doesn't support recursive operations.

However, SFTP does allow you to upload both directories and files. Behind the drag-and-drop action, Fugu gets around SFTP's lack of support for recursive operations by building up a local queue and then creating directories and uploading files. The end result is that Fugu's SFTP mode uploads whole directories, even though SFTP itself can't yet.

You can invoke file transfer with SCP manually, and it starts automatically when copying directories, as noted above. You must start each transfer fresh. SCP copies both files and directories, including any subdirectories. You must specify the file or directory names on both the local and remote computers, along with the full path for each. For upload, you can also simply drag and drop from the Finder.

As it does with SFTP, Fugu allows you to bookmark SCP sessions and choose a local file for upload from a list of recent transfers. It even shows preview images of local files. Finding a file for upload is much like finding a file to open in any other OS X program.

SSH tunneling

Tunneling, when one protocol is wrapped inside another for the purpose of making a connection, is useful for certain tasks. With Fugu, the outer wrapper is SSH, which encrypts the data being transferred.

One method of tunneling is to make local connections on one computer appear local on another. For example, many Web hosts offer MySQL or PostgreSQL database hosting. If you're doing a backup, major site revision, or testing, you might need to make a remote connection to the database while protecting that connection with login access and encryption. If your LAMP setup is accessible on one computer, but you want access on another, you can connect a specific port on your computer and a specific port on the host computer via SSH.

Without an SSH tunnel -- say, in the case of MySQL -- you can connect directly to port 3306 on the LAMP server, but that connection would not be encrypted. To get an encrypted connection, first make an SSH tunnel from port 3306 on your local computer to port 3306 on the remote computer, and then connect to port 3306 on your local computer, to create the illusion that the database is local.

A more complicated way to use tunneling is to make an SSH connection between two computers, and then use the second computer to connect to a third. In other words, the first computer connects to the third via the second.

Fugu allows either option. Pull-down menus listing previous connections simplify the process.

Fugu lets you bookmark your password as part of the login process. You can also use public key authentication, but you must set it up separately, either via the command line or with the help of another graphical front end such as SSH Agent.


The University of Michigan's Research Systems Unix Group (RSUG) maintains Fugu; the copyright is held by the Regents of the University of Michigan. Fugu is freely available under an open source license.

The current version, 1.2.0, is available as a universal binary, which means that it runs on both the PowerPC and Intel-based architectures. The source code, available from the same site, comes in English, Traditional Chinese, Danish, Dutch, German, Finnish, French, Italian, and Spanish.

Fugu comes in handy when you want a clean graphical user interface to do secure file transfers or housekeeping for remote files. It can help you set up quick SSH tunnels without requiring you to learn a lot of syntax.

Lars Noodén is an alumnus of the University of Michigan, 1993 and 1996. Special thanks to Andrew Mortensen, Macintosh environment lead at the University of Michigan.

Click Here!