We're an ISO27001:2013 Certified Supplier

sshfs filesystem

The sshfs utility is a FUSE (“Filesystem in Userspace”) program that allows you to mount a directory from a remote system locally, assuming you have ssh access to the remote system. The command format is:

$ sshfs user@remote-system local-mountpoint options

There are lots of options, but the one that is almost always worth using is -C, which enables compression on the ssh link.

Mounting

Here is it in action:

$ mkdir workpc
$ sshfs kae@myworkpc.tiger-computing.co.uk: workpc -C

At this point, you can edit / copy / generally work on files under workpc as if they were local files.

Unmounting

A minor gotcha is that simply using umount won’t work:

$ umount workpc
umount: workpc: Permission denied

Non-privileged users are not permitted to unmount filesystems by default. However, because sshfs is a FUSE filesystem, we can unmount it with fusermount:

$ fusermount -u workpc

Was This Linux Tip Useful?

Let us know in the comments below.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Secure. Reliable. Scalable.

If that doesn't describe your current Linux systems, check out our FREE Linux Survival Guide to help you get your systems up to scratch today!

  • This field is for validation purposes and should be left unchanged.