Network Attached Storage using a Raspberry Pi and SSHFS

Last modified on 2015-02-05

Connect a Pi to external USB storage and create a cheap and cheerful NAS device via SSH Filesystem (SSHFS).

With a Pi-attached 1TB hard drive hosting a properly configured SSH server nothing extra is required server-side.

On the client… Install SSHFS and create a mountpoint for the remote filesystem …

sudo apt-get install sshfs
mkdir ~/NAS                                                          

Mount the Pi-hosted remote filesystem (example: ip_address: to the client …

sshfs -o idmap=user ~/NAS

Contents of the remote hard drive now appear as local directories and files on the laptop. Data transfer between server and client is SSH-encrypted.

Use fusermount to detach from the remote storage …

fusermount -u ~/NAS                       

Raspberry Pi + SSHFS is no speed demon but its very usable. On my laptop using a wireless LAN connection I am able to run Rhythmbox playing music and videos in VLC remotely hosted on the Pi.

🐧 Part of the Linux Home Server project.

Happy hacking!