Data Transfer/SSHFS
Sshfs is a network protocol for mounting data. It uses sftp under the hood.
Installation
For the necessary installations follow this link:
How to use SSHFS to Mount Remote Directories over SSH.
a) MacOS after the installation
To enable sshfs on your Mac go to: System Preferences -> General tab -> Allow Extensions button
Then follow the instructions that pop up (make sure that you remember the instructions before shutting down your computer).
b) Linux installation short commands
- Debian/Ubuntu:
apt-get install sshfs
- CentOS/RedHat:
yum install fuse-sshfs
- If you want to use /etc/fstab, you can do this with the following entry:
sshfs#<username>@<hostname>: <your_local_mountpoint> fuse defaults,user,noauto,exec,reconnect 0 0
Usage
Windows
- Go to "This PC" and select "Connect network drive" ("Netzlaufwerk verbinden")
- Select a drive (W:) and click on "connect with webpage on which you can save documents and images" (Verbindung mit website herstellen, auf der Sie Dokumente und Bilder speichern können)
- Enter the following as address, to connect to the home folder on the cluster:
If you would want to go two folders up, you would add “../../” at the end.
\sshfs\<username>@<hostname>/
MacOS & Linux
- Create an empty directory. The cluster/storage folder is going to be mounted to this directory.
- Mount a folder from the cluster/storage:
# Home folder sshfs -o reconnect <username>@<hostname>: <localPath> # subfolderX sshfs -o reconnect <username>@<hostname>:subfolderX <localPath>
Undo mounting
MacOS & Linux:
If the connection to the cluster broke and you want to remount, you often have to use umount first. Try to remember to always unmount first before retrying. Otherwise it can happen that unmounting is not possible anymore by cmd. Usually the error message in this case tells you that the process is currently busy and therefore cannot umount. In this case, you have to restart the notebook which automatically unmounts everything.
```bash umount -f <localPath> # For example umount -f /Users/<username>/Documents/mounted # or use fusermount -u <localPath> ```
Alternative tools using sshfs
We've described the most common way of using sshfs. Alternatively, you could use one of the following tools.
Tools to mount a Network Drive | Windows | Mac | Linux |
---|---|---|---|
WebDrive (additionally for iOS, Android) | ✓ | ✓ | ☓ |
SFTPNetDrive | ✓ | ☓ | ☓ |
NetDrive | ✓ | ☓ | ☓ |
ExpanDrive | ✓ | ✓ | ✓ |