Fugu 1.1

24 October 2003

An Open-Source Mac OS X Frontend for OpenSSH's sftp client

The Edible Part of the Blowfish

http://rsug.itd.umich.edu/software/fugu
fugu@umich.edu

© 2003 The Regents of the University of Michigan
All Rights Reserved.

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of The University of Michigan not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. This software is supplied as is without expressed or implied warranties of any kind.

Fugu, c'est quoi?

Fugu est une interface graphique pour le client SFTP (Protocole de Transfert de Fichier Sécurisé) qui est livré avec Mac OS X. SFTP est similaire au FTP, mais la totalité de la session est cryptée, ce qui veut dire que rien, mot de passe inclus, n'est envoyé en clair. Fugu propose une interface agréable, intuitive pour un client SFTP d'OpenSSH, avec la possibilité de faire du transfert de fichiers sécurisé par glisser-déposer. Fugu permet de bénéficier de l'encryption forte de SFTP sans avoir à sacrifier la facilité d'utilisation. De plus, Fugu permet le transfert sécurisé de fichiers en utilisant SCP, et peut créer des tunnels SSH pour faciliter l'interaction entre machines.

Sommaire

• Requirements

• Using SFTP with Fugu:
 	• How to connect
	• Uploading
	• Downloading
	• Navigating
	• Deleting
	• Renaming
	• Showing file or folder information

• Using SCP with Fugu

• Creating an SSH Tunnel with Fugu:
	• What you need
	• Creating the tunnel
	• Using the tunnel
	• Closing the tunnel

• Frequently-Asked Questions:
	• Why doesn't Fugu tell me how much of a file it has downloaded or uploaded?
	• Why can't I download folders with SFTP?
	• I'd like to contribute a localization. Whom should I contact?
	• Where can I get the source?
	• I'd like to contribute a patch. How do I go about submitting it?
	• Will there be traditional FTP support?
	• How do I use key authentication with Fugu?

• Version History

Requirements

Fugu has been tested on Mac OS X 10.2.x. It may work with on Mac OS X 10.1. You must also have the BSD subsystem installed, of which OpenSSH's sftp client is a part. This is included with the default installation of Mac OS X. Mac OS X 10.0 is not supported.

Using SFTP with Fugu

• 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, as seen below:

Enter your password in the field provided. You may optionally add your password to your password keychain by clicking the Add Password to Keychain checkbox.

When you've entered your password, click Authenticate. 

• 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.

• 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.

• 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.

• And more....

Fugu has lots more to it. Try customizing the toolbar to your liking, or take a look at the Fugu's Console to see what's going on under the hood. 

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 need to enable Remote Login in the Sharing Pane of Apple's System Preferences program.

• 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 re-directed securely through your tunnel host to the FTP server.

If you're tunnelling to an FTP 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: OpenSSH's sftp client doesn't yet 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 beta supports 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: 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 Danish, Dutch, French, German, Italian, Japanese and Spanish; the localizations will be included in Fugu 1.1.

Q: Where can I get the source?

A: The source is available via anonymous CVS. To get it, set your CVSROOT to:

	:pserver:anonymous@rsug.itd.umich.edu:/usr/local/src/cvsroot

Login using cvs login. The password is "RSUG", minus the quotes. You can also browse the source on the web by going to:

	http://rsug.itd.umich.edu/cgi-bin/cvsweb.cgi/fugu/

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 the source in CVS 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: 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.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 (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.

Credits

	Written by Andrew Mortensen.

	Localizers:
        		• Danish: Jes Kasper Klittum
		• Dutch: Alexander Henket
		• Finnish: Hannes Juutilainen
                        • French: Laurent Lestrade
                        • German: Thomas Fuchs
                        • Italian: Livius Milanesio
                        • Japanese: Tatsuma "TED" Nakayama
                        • Spanish: Jose Gil Cabedo