Whatbox Logo
Login for certain variables to be updated with your slot's information

Wiki > sshfs

sshfs makes accessing and modifying remote file systems seemless versus using rsync, FTP or rclone. sshfs is already installed on your Whatbox slot making it very easy to enable. After enabling, you can use cp or mv or any other file-modifying commands on the command line. For example, if you have a Plex server running at home, you could mount your Plex server as a sshfs mount and use Sonarr/Radarr/etc to move files to it seemlessly.

Setting up sshfs

From the sshfs man page:

SSHFS (Secure SHell FileSystem) is a file system for Linux (and other operating systems with a FUSE implementation, such as macOS or FreeBSD) capable of operating on files on a remote computer using just a secure shell login on the remote computer. On the local computer where the SSHFS is mounted, the implementation makes use of the FUSE (Filesystem in Userspace) kernel module. The practical effect of this is that the end user can seamlessly interact with remote files being securely served over SSH just as if they were local files on his/her computer. On the remote computer the SFTP subsystem of SSH is used.

Set up the Remote File System

  1. Connect to your slot through SSH.

    ssh user@server.whatbox.ca

  2. Make a new directory for mounting the remote file system

    mkdir ~/mnt_name

  3. Prepare the ssh connection to the remote server. You can skip this step if you want to use your password instead of (recommended) ssh keys.

    ssh-keygen (unless you have already done this)

    ssh-copy-id remote-user@x.x.x.x or ssh-copy-id remote-user@remote-site.tld

  4. Type in the sshfs command. This should always be a remote server and not your the server you are logged into.

    sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,cache_timeout=3600 remote-user@remote-site.tld:[/optional/remote/path] ~/mnt_name

    A lot of people use the FUSE option -o allow_other (allow other user) but we won't be using that option with Whatbox.

  5. Now you can access files on the remote machine as if they were local

    ls ~/mnt_name