FTP Related Articles > Fugu Open Source Mac OS X Frontend for OpenSSH sftp client

Fugu Open Source Mac OS X Frontend for OpenSSH sftp client

Fugu is a graphical frontend for the text-based Secure File Transfer Protocol (SFTP) client that ships with Mac OS X. SFTP is similar to FTP, but the entire session is encrypted, meaning nothing, including passwords, is sent in the clear. Fugu provides a friendly, intuitive interface for OpenSSH's SFTP client, featuring secure drag-and-drop file transfers, remote file editing and remote file preview. Fugu allows you to take advantage of SFTP's strong encryption without having to sacrifice ease of use. Additionally, Fugu can make secure file transfers using Secure Copy (SCP), and can create SSH tunnels to faciliate secure interaction between machines.

How to connect to an SFTP server

Launch Fugu. In the Connect to field, enter the name of the SFTP server. Enter the user name you have on the server in the Username field. The Port field and Directory field are optional. If you know that the SFTP server is running on a non-standard port, you would enter the server's port number in the Port field. If you want to go to a directory other than the default (usually your home directory), enter the path in the Directory field. When you've filled out all the information, you may optionally add this information to your list of Favorites, by click the Add to Favorites button. After you've added a server to your Favorites list, you can select it from the pop-up button located at the bottom left-hand corner of the connection pane. Editing Favorites is done in Fugu's preference panel. When you're ready to connect, click the Connect button. If Fugu needs your password, it will ask for it.

Uploading files and folders

Drag the items you want to upload from the Local (left-hand) pane and drop them on the Remote (right-hand) pane.

Downloading files

Downloading files is just like uploading them. Drag the files you want to download from the Remote pane and drop them on the Local pane. Version 1.2.0 adds the ability to download files from the remote pane by dragging them to the Desktop or any open Finder window.

Downloading folders

The sftp client that Fugu wraps does not support folder downloads. To get around this limitation, Fugu uses SCP to download folders. When you try to download a folder, Fugu will offer to download for you with SCP. If you choose Download with SCP, Fugu brings forward the SCP window for the transfer (see the SCP section below for more).

Navigating

Double-click folders to show their contents. To move up a level, click the up arrow button located next to the pop-up button listing your current location. To move to a folder in the path of your current location, click the pop-up button, and select the desired folder from the list. Fugu also has folder histories for the Local and Remote panes, storing the last 20 places you've been. You can click the History buttons in the toolbar, and select the location to which you'd like to go. You can use the arrow keys to navigate, as well. The right arrow key enters the selected directory. The left arrow key causes Fugu to move the current directory's parent.

Deleting files and folders

To delete an item, select it, and hit the delete key on your keyboard; or select the item, and click the Delete button in the toolbar. You will be prompted to confirm that you want to remove the item. The sftp client Fugu wraps does not know how to delete folders recursively. This means that it will give you an error if you try to remove a folder that is not empty. Delete the items in the folder first, then delete the folder.

Renaming files and folders

To rename an item, select the item, and hit the Enter key on your keyboard; or right- or control-click on the item, and select Rename from the contextual menu. Fugu will select the name of the item and make it editable. When you've completed renaming the item, hit Return on your keyboard. To cancel a rename, click on another item.

Showing file or folder information

To see all the attributes of an item, whether on your computer or on the SFTP server, select the item and choose Get Info from the SFTP menu. In the info panel, you can modify file and folder permissions, set owner and group, and see other information pertaining to the selected item.

Using SCP with Fugu

Connecting to use SCP is just like connecting with Fugu to use SFTP, except that you will be asked to specify the path to the item you want to transfer. Select New Secure Copy from the SCP menu. In the SCP window, enter the name of the server. you'll be connecting to in the Remote Host field. In the User Name field, enter the user name you have on the server. If copying from your computer to the server, click the Choose... button and select the item to copy. If the remote is stored on the server, you'll need to enter the path to it in the Item to Copy field. You may also optionally enter the location you want the item transferred to in the Copy File to Path field. To indicate whether you'll be uploading or downloading the item, choose either Upload Item to Remote Host or Download Item from Remote Host from Copy Type field. When you're ready to begin copying, click the Secure Copy button, and enter your password when prompted.

Creating an SSH Tunnel with Fugu

  • What you need - To create an SSH tunnel, you need an account on a machine running SSH, which will act as the tunnel host for you. If you don't have access to such a machine, you can use your Mac as the tunnel host. If this is the case, you'll
  • Creating the tunnel - From the SSH menu, select New SSH Tunnel. In the Remote Host field, enter the name of the server you want to connect to via the SSH tunnel. In the Remote Port field, enter the number of the port on which the service you want to use is running. If the server you're connecting to is running FTP, the port number is generally 21. In the Local Port field, enter a number greater than 1024; it doesn't really matter which. In the Tunnel Host field, enter the name of the computer on which you've got a valid SSH account. Enter the user name you have on that server in the Username field. The Port field is optional. When you've filled out all the information, click the Start Tunnel button. When you've authenticated, a small window will be put in the upper right-hand corner of the screen, containing a pop-up button in which the tunnel information is listed.
  • Using the tunnel - Once your SSH tunnel is established, you can connect through it to the server you entered in the Remote Host field. To make this connection, you do not connect to the Remote Host, but to your own computer, or "localhost." Say, for example, you're tunnelling to an FTP server. After establishing your SSH tunnel, open an FTP client, and in the Server field or its equivalent, enter "localhost". In the Port field, enter the number you put in the Local Port field of Fugu's SSH Tunnel window. In the Password field, enter the password you use for the FTP server, and connect. Your connection is redirected securely through your tunnel host to the FTP server. If you're tunnelling to an FTP storage server, as in this example, you will need to make sure that you have Passive mode enabled in your FTP client.
  • Closing the tunnel - When you're done with the tunnel, simple click the Close Tunnel button. You will be prompted to confirm the closure. Click Close Tunnel.

Frequently-Asked Questions

Q: Why doesn't Fugu tell me how much of a file it has downloaded or uploaded?
A: Some versions of OpenSSH's sftp client don't provide the sort of feedback that would be necessary for such information. Once it does, Fugu will provide you those sorts of updates. In the meantime, Fugu lets you know that files are being downloaded or uploaded, and updates the GUI when either operation is complete. You may also check Fugu's Console for information or errors. OpenSSH release 3.6.1p1 does provide transfer progress feedback. Fugu 1.1 and subsequent releases support transfer progress display if the version of OpenSSH installed on the computer is 3.6.1p1 or newer.

Q: Why can't I download folders with SFTP?
A: Fugu only wraps OpenSSH's command line sftp client. That client is incapable of uploading or downloading directories. Fugu does add the ability to upload folders, but does not yet support directory download or recursive remote directory deletion. Although SFTP still lacks the ability to download directories, Fugu will prompt you when you try to download a directory, asking if you'd like to download it with SCP instead. It's not a perfect solution, but it does provide a workaround in the meantime.

Q: When I connect I get an error that says "server.host.edu: connection refused." Why?
A: The server isn't listenting for SSH connections on the standard port. It may not be running the SSH service at all. Contact the system administrator for help.

Q: After I authenticate Fugu tells me "Request for subsystem sftp failed." What does that mean?
A: The server isn't configured to be used as an SFTP server. It allows SSH connections, which is why you were able to authenticate, but when you asked the server to set up the SFTP session, the server was either unable to find the sftp-server tool, or was deliberately configured to deny SFTP sessions. Contact your administrator for more information.

Q: Fugu was working fine, but now when I try to upload files Fugu says "Couldn't get handle: failure." Wha...?
A: One of the most helpful errors from OpenSSH's sftp, this message typically means that there isn't enough space on the server's disk for more data. This could be because you've hit your quota limit, or that the disk itself is full. Contact the server administrator for help.

Q: I'd like to contribute a localization. Whom should I contact?
A: Please e-mail fugu@umich.edu if you'd like to contribute a localization. The developers will be more than happy to discuss this with you. There are currently translators for Chinese, Dutch, Finnish, French, German, Italian, Polish and Spanish; the localizations are included in the international version of Fugu 1.1.1. Because version 1.3 of Fugu is likely to involve significant modification to the .nib files, please refrain from translating them at this time. In the meantime, we encourage

Q: I'd like to contribute a patch. How do I go about submitting it?
A: First, contact us at fugu@umich.edu, so we can discuss what you'd like to work on, and whether anyone else is working on your favorite feature. After we've arranged everything, and you've tested your work thoroughly, create a patch against CVS HEAD with diff -u. We should be able to apply the patch to our source with the patch command. Ideally, the formatting of your code should match the formatting in the Fugu source. It makes the code easier to read, and therefore easier to accept.

Q: Will there be traditional FTP support?
A: Yes. The intention is to provide an FTP option. It would (or should) be used only for anonymous connections. In the meantime, if you must use traditional FTP, use Fugu's SSH tunnel capabilities to create a secure connection to the server.

Q: What about FiSH?
A: File transfer over SsH, or FiSH, is sort of kludgey way of running an FTP-like session over SSH. Unlike SFTP, which requires the sftp subsystem to be enabled, FiSH only needs an SSH connection to work, relying on a perl script the client uploads to the server to handle FTP-like commands. I'm currently investigating adding FiSH support to Fugu, but adding FTP support is a higher priority. If you're interested in writing a patch for FiSH support in Fugu, please contact me.

Q: How do I use Public Key authentication with Fugu?
A: I recommend using SSH Agent (http://www.phil.uu.nl/~xges/ssh), a GUI frontend to the ssh tools that set up the proper environment variables for such authentication. Documentation on how to create authorized key files and public/private key pairs may be found in many places on the web. There has been some discussion of improving Fugu's use of keys. You can also set the environment up from the command line, and launch Fugu there. Fugu will inherit the environment variables of the terminal session.

Version History

  • 1.2.0 (2 May 2005):
    • new: promised file drags (drag and drop to Finder from remote pane)
    • new: additional external editors
    • update: additional FAQ content
    • fix: search paths for alternative OpenSSH installations return valid paths
  • 1.1.3 (22 Apr 2005):
    • new: support for Mac OS X 10.4 Tiger
    • new: search path support for alternative ssh binaries (Eric Knauel and Thomas Rasch)
    • fix: build number is stored in Info.plist, not hard-coded
    • fix: corrected handling of * in filenames when parsing server output
  • 1.1.2 (21 Feb 2005):
    • new: scp image well accepts drops
    • new: scp local path field accepts drops (Mark Fleming)
    • new: sftp filetype in info window is obtained via LaunchServices
    • new: project upgraded from ProjectBuilder to Xcode native
    • fix: sftp properly nul-terminates raw byte strings in download path
    • fix: sftp browser re-caches icons if directory is modified
    • fix: sftp CLI external editing handles spaces in pathnames
    • fix: eliminated crash when uploading an externally edited file and Fugu is hidden
  • 1.1.2rc1 (3 Jan 2005):
    • Real local icon display.
    • Icon caching system improvements.
    • Fix for changing filenames that truncated with an ellipsis.
    • Errors display properly when they occur during upload or download.
  • 1.1.1 (13 Dec 2004):
    • Added advanced options settings to Favorites.
    • Overwrite behaviour is more consistent.
    • Overwrite prompts can be disabled with hidden default
  • 1.1.1rc2 (6 Dec 2004):
    • Fix for hanging connections.
    • Improved ssh version detection.
    • Fix for handling raw byte directory names.
    • Warning message if we try to run SSH.com's sftp (unsupported).
    • Somewhat improved searching for supported external editors.
    • Minor improvements to unknown host key parsing.
  • 1.1.1rc1 (30 Nov 2004):
    • Much improved handling of unknown character encodings.
    • Improved method of locating valid External Editors.
    • Support for TextMate as an External Editor.
    • Support for vi and emacs as External Editors.
    • Fix for date sorting.
    • Much cleaner backend code (a continuing effort).
    • Experimental spring-loaded folder support.
    • Improved update checking.
    • Filename abbreviation with ellipsis, like the Finder.
  • 1.1 (24 Oct 2003):
    • Fix for continuous beeping occurring when transferring files and window is minimized.
    • Sort items by name if size, date, owner, group or permissions are the same.
    • Fix: added columns appeared in English even if Fugu was running in another language.
    • Fixed a crash caused by corrupted autosaved NSTableViews.
    • Fix for endless progress bar spinning when refreshing directory listings.
    • Restored local port field to SSH Tunnel window.
    • Prefs loaded more reliably.
    • Some toolbar image tweaks.
    • International version has localizations in Dutch, Finnish, French, German, and Spanish.
  • 1.1 beta 2 (26 Sep 2003):
    • Clicking on column headers now sorts column contents.
    • Added PageSpinner as a supported external editor.
    • Added support for OpenSSH 3.7.1p2. (3.7p1 and 3.7.1p1 contain a bug that prevent Fugu
    • from working properly.)
    • Significant improvements to the backend.
    • Fix for SSH Tunnel window not updating following successful authentication.
    • Fix for preference panel disappearing.
  • 1.1 beta (3 Sep 2003):
    • External Editor support (BBEdit, BBEdit Lite, SubEthaEdit, TextWrangler).
    • Image previews.
    • Customizable information display in file browsers.
    • New toolbar icons.
    • Support for OpenSSH 3.6 (transfer progress feedback)
    • Revised information panel.
    • Added ability to use compression, force SSH1 connections, and take additional ssh
    • command line options.
    • Rendezvous support.
    • Expanded preferences and new preference panel look.
    • Optional ASCII-order or alphabetical file sorting.
    • Improved sorting speed.
    • Simplified SSH Tunnel interface.
    • Support for servers running on Cygwin.
    • Support for servers running OpenSSH 2.x.
    • Fix: display changes after modifying a remote item's owner, group or mode.
    • Improved icon display.
    • Fix: tabbing between local and remote browsers now works.
    • Fix: nicknames for favorites now stick.
    • Fix: moving local files to trash now more reliable.
  • 1.0 (10 Apr 2003):
    • Improved type-ahead find, behaving more like the Finder.
    • Added ability to rename files and folders.
    • Fixed issue in which no files or folders would be displayed when connecting to a VShell
    • server's root directory.
    • Fixed a few interface problems; added constraints to the size of the SFTP panes.
    • Added nicknames for Favorites in preferences window.
    • Improved documentation.
    • Slightly improved handling of character encodings.
    • If available, use nicknames in Favorites pop-up button.
    • Using sheets instead of modal windows when possible.
    • Don't quit program when last window is closed.
    • Using NSCell subclass instead of NSBrowserCell, which was causing some graphic glitches.
    • Improved error reporting when something goes wrong trying to use the keychain.
    • If the host to which we're trying to connect doesn't exist, let the user know.
  • 0.9.4 (3 Apr 2003):
    • Keychain support.
    • Support for connections to Windows machines running VShell.
    • German localization by Thomas Fuchs.
    • Basic type-ahead find implementation.
    • Fix for hang occurring when Fugu encounters filenames containing characters that do not
    • conform to UTF-8. (Recognizing and properly handling all character sets is in progress.)
    • Fix for problem in which Fugu would upload a file to the current remote directory instead
    • of the folder on which it was dropped.
    • Fix for incorrect permission check box settings.
    • Support, in a way, for the ~ shortcut in the Go To sheet when moving to another remote
    • directory. (OpenSSH's sftp client does not expand ~ in paths.)
    • Local filenames are displayed using -displayNameAtPath:
    • File listings are properly reloaded following a successfuly secure copy.
    • Redesigned connection interface, relying less on sheets.
    • Only one trash can in toolbar.
    • Keyboard shortcuts allowing user to shift focus from one pane to another.
    • Increased and improved use of tooltips.
    • Removed obsolete Connect toolbar item.
  • 0.9.3 (14 Feb 2003):
    • Support for non-ASCII characters in filenames, including Chinese
    • and Japanese glyphs.
    • Support for localizations (Fugu is currently only available in English).
    • Fixed memory leak in sftp process thread.
    • Added local and remote history buttons to toolbar.
    • Fugu now remembers the size and position of the sftp window between
    • sessions.
    • Workaround popup button's refusal to include multiple items of the same name.
    • Fix for bug causing Fugu to overwrite a file even if user doesn't want it to.
    • Fix for directory drops on remote directories: files are now properly uploaded to
    • that directory, instead of to its parent directory.
    • Added ability to check for new versions of Fugu.
    • Fugu can now delete multiple files locally and remotely. Please note that this
    • does not mean Fugu can delete directories that are not empty.
    • Fixed memory leak in scp process thread.
    • Fixed memory leak in ssh process thread.
    • Info panel does not allow user to select the Remote tab unless Fugu is
    • connected to an sftp server.
    • Fix for upload progress bar remaining a barber pole after initial upload.
    • using -UTF8String instead of the deprecated -cString.
  • 0.9.2:
    • Favorites can now store username, server name, port, and directory.
    • Fugu now always prompts when user asks to delete or to overwrite
    • something.
    • Contextual menus have been added to both SFTP panes:
    • Get Info, SCP, and Delete. The local menu also has Open.
    • Info panel automatically selects correct info tab depending on
    • active SFTP pane.
    • Info panel interface improvements.
    • Fixed bug changing local file permissions.
    • Ability to choose from favorites in SSH Tunnel window.
    • Added tunnel shortcut for AFP.
    • Preferences panel interface has been improved.
    • Fugu borders the active SFTP pane with a blue highlight.
    • Tab between SFTP panes.
    • New keyboard shortcuts to connect and disconnect.
    • New help menu.
    • Fixed small memory leak occurring when getting info.
    • Fixed rare problem preventing addition of new favorite.
    • New directory keyboard shortcut restored.
    • Modified remote delete icon.
  • 0.9.1:
    • Fixed directory upload bug causing nested files and folders to
    • appear at the top level of the uploaded directory.
    • Fixed bug preventing Fugu from making another connection following
    • a cancel.
    • Complete overhaul of the interface: Fugu now features a customizable
    • toolbar.
    • Fugu now checks the local version of SSH before connecting,
    • and if it discovers a version of OpenSSH 3.5 or newer, adjusts its commands accordingly.
    • SFTP local and remote panes are now resizable.
    • Modified login panel appearance.
    • Fugu now displays an authenticating UI until the connection is
    • established, instead of dismissing the password sheet and waiting for a response from the server.
    • Modified and enchanced info panel: added chmod, chown and chgrp
    • abilities to interface.
    • SCP support significantly enchanced: download support, directory
    • upload and download support.
    • Added Go To Directory for localhost.
    • Refresh command now refreshes local and remote panes.
    • Fixed bug causing a memory leak when SCP or SSH Tunnel windows
    • were opened and closed rapidly.
    • New Fugu icon.
    • Delete key now deletes selected item in pane that has keyboard focus.
    • Right arrow key moves into currently selected directory,
    • if applicable.
    • Left arrow key moves to parent directory.
    • Can now select and download multiple files from server.
    • SSH Tunnel favorites added.
  • 0.9.0:
    • Fixed memory leak that occurred during directory upload.
    • Added SCP support and SCP system service: you can now select a file
    • in the Finder and choose Fugu > Secure Copy... from the Services menu to transfer single files.
    • Dropping files on the Fugu icon now brings forward the SCP dialog.
    • Added ability to create SSH tunnels.
    • Added timers to upload/download sheets.
    • Added preferences for default local directory and default username.
    • The remote pane now properly handles multiple file/folder drops,
    • instead of just uploading the first item.
  • 0.8.5:
    • Added support for Public Key authentication and S/Key passwords.
    • Added support for connections to ssh servers listening on ports
    • other than the default (22).
    • Added basic preference panel.
    • Tested on 10.1.x and developer builds of 10.2.
    • Fixed bug in which Fugu would try to upload when disconnected,
    • leading to an abnormal exit.
    • Modified About Fugu panel, enabled link to homepage,
    • changed contact address, changed README panel.
  • 0.8.2:
    • Fixed problem moving to a directory from the popup list when a
    • path element contained a space.
    • Added better dialogs for time outs and cases when the remote host
    • identification have changed.
    • Fixed an issue downloading in which the downloaded file was put in
    • a different directory than the one specified.
    • Cancel buttons on connecting, password, upload and download sheets
    • now function. Occasionally cancelling during connecting or at the password prompt will prevent Fugu from making other connections. The temporary solution is to quit and relaunch Fugu.
    • If the SFTP session ends unexpectedly, Fugu now handles it better,
    • reseting itself and preparing for another connection.
  • 0.8.1:
    • Fixed Add To Favorites button: only enables when there is text in
    • the hostname field.
    • Fixed issue causing a PANIC message: no writes to fd when not
    • connected.
    • Better error reporting, including "Permission denied" dialogs
    • when appropriate.
    • Fixed issue where Fugu might not realize it had a directory listing.
    • Fixed upload/download arrow actions: they now do as they are
    • supposed to.
    • Fixed problem deleting remote files: we now remove empty directories
    • properly. Still no support for removing directories containing other files/directories.
    • 0.8:
    • Initial public release.

Source: Fugu homepage

ORDER FTP HOSTING