Mount a remote filesystem over SFTP connection using SSHFS

SSHFS allows you to mount a remote filesystem over a simple SFTP connection. It is quite useful as most SSH servers support it out of the box, so you don’t really need any server-side configuration. All you need is SFTP access to the remote location.

Let’s say you have a cloud server your-cloud-server-ip and a user sftp01 allowed to connect over SFTP.

To mount the home directory of the user sftp01 using SSHFS you simply do:

sshfs sftp01@your-cloud-server-ip: /mnt/sftp01 -o allow_other

This will mount the home directory of the user sftp01 in the /mnt/sftp01 folder on your local computer. From there on you simply browse and use the remote folder as a local filesystem.

To unmount an SSHFS filesystem:

umount /mnt/sftp01