Its a quick and simple way to interact with headless systems like Raspberry Pi.

What is SSHFS?

SSHFS gets its name fromSecureSHell andFileSystem.

Terminal window showing the manual page for the Mutt email client on Linux

Regular SSH lets you connect to remote computers from a terminal window.

Your commands are executed on the remote computer.

SSHFS mounts a remote file system on your local computer.

Installing SSHFS on Ubuntu.

The mounted file system appears as a normal branch of your local file systems directory tree.

You pull up the remote files just like any other file on your gear.

you might browse through the directories and files using the cd command or a file web app.

Installing SSHFS on Fedora.

Working with the files uses the applications on your local computer, not the remote computer.

For example, editing a file uses your local editor.

SSHFS isnt really suited to executing programs located on the remote computer.

Installing SSHFS on Manjaro.

Thats the sort of stuff best suited to a regular SSH connection.

But, for working with remote files, SSHFS can’t be beat.

Installing SSHFS

To use SSHFS, SSH must already be working on the remote computer.

Using the –version option to discover the version of SSHFS.

Weve covered how to set up SSH elsewhere.

We recommendusing SSH keys instead of passwords.

If SSHFS isnt already installed on your local computer, installing it is easy.

Creating the mount point directory.

Making a Remote Connection

We need to create a directory to act as themount point.

Its where the remote file system will be grafted onto your directory tree.

You should use your own username instead of “dave.”

Using ls to check the attributes of the mount point directory.

On other distributions, the default location might be /run/media/ or /mnt.

Ultimately, you might create your mount point anywhere you like.

Lets take a look at our new directory.

Mounting the remote file system on the local mount point.

Our directory has been created, and it is owned by root.

That wont matter though, well haveread and write permissionson the mounted file system.

The SSHFS command is long-ish, but fairly simple when you break it down.

Listing the contents of the remote file system in a terminal window.

The command consists of:

Were prompted foryourpassword because youve used the sudo command.

Were then asked for the password for the account on theremote computer.

Answer yes to this.

Creating a file in the remote file system and checking its attributes.

That doesnt happen when you mount a file system with SSHFS.

We can see the home directory of the user account on the remote computer.

Any changes you make here are made on the remote drive.

Copying files from the remote file system to the local file system.

Any edits or deletions will affect the remote computer.

We ought to be able to create a new file.

Our file is created, and were the owner of it.

Accessing the remote file system in a file browser.

There was no need to use sudo.

We can navigate the mounted file system using cd, and we can copy files using the cp command.

This effectively transfers files between the remote equipment and your local computer.

Editing a file in the remote file system with a local editor.

The mounted file system will show up as a mounted volume.

Clicking the name of the mount point takes you straight to the remote files.

Double-clicking a file opens the app associated with that file bang out.

Unmounting the remote file system.

These actions are carried out by applications on your local computer.

If you edit a document, for example, your default local editor is launched.

Note theres no n before the m in the umount command.