Welcome to the first instalment in a series of “Hints and Tips” from our expert research software engineer and research infrastructure engineers with the aim of making your research that little bit easier to do! In this article Ian Cottam looks at how to transfer your files between the various Research IT computational resources if you use Apple macOS or Linux.
These days many of us run applications remotely from our desktop on computational platforms such as CSF3 or Condor, to name two local services provided by Research IT. A growing trend is the use of off-premise or cloud services (AWS, Azure, etc.). What characterises all of these services is that you login to them using ssh (secure shell).
After establishing login, the next question is how to transfer your files up to and down from these remote services. And, many users have 100s or 1000s of files to process or generate. Researchers using Microsoft Windows are used to doing most things via a GUI (Graphical User Interface), including file transfers to remote systems. We typically recommend MobaXterm and WinSCP.
However, researchers using Apple macOS or Linux often fall back on complex command-line tools (such as rsync) for file transfers. Rsync, and similar command-line tools, have lots of arguments, and it is easy to make a mistake or forget how to use them. If you recognise this situation, this article is aimed at you.
In the details below we show how a file transfer GUI – i.e. providing file drag’n’drop – can be used on Apple’s macOS, but the details for Linux systems are very similar. We also use Condor as the target remote system, but remember anything that uses ssh to login is equally applicable.
The idea is to install a sub-system called FUSE with one of its many plugins (sshfs). FUSE lets you add and mount/unmount different types of file systems; and sshfs is the file system for servers using ssh to login to. On your Mac, download FUSE and follow the simple instructions to install it. A FUSE entry should appear in your System Preferences. Next, download the plugin sshfs and, again, follow the simple install instructions.
We are now ready to mount the remote system as a file system on our desktop/laptop Mac. As a one-off action, create a new folder somewhere on your Mac that will be the mount point for the file system. If you want it on your Desktop, just right-click the background and select New Folder; give it a name such as “Condor”. (Note that macOS’s Finder by default does not show mounted file systems on the Desktop. To fix that, select Finder/Preferences and tick Connected Servers.) You then need to issue a one line command in a Terminal window:
sshfs email@example.com:/scratch/username ~/Desktop/Condor
replacing username (twice) with your actual University of Manchester user name. After entering your password, you should see the file system mounted on the Desktop, and you can double click to open it and drag files in and out in the usual way. When finished, if you like, right click the file system and select Eject.
Repeat the above for CSF3 and any other remote ssh system you use regularly. Enjoy simple, GUI-based file transfers!
If you have any problems with drag’n’drop or anything else connected with the use of Research IT computational resources, please get in touch!