Skip to content

Instantly share code, notes, and snippets.

@vestjoe
Last active July 25, 2018 22:54
Show Gist options
  • Save vestjoe/9fca7b094df61e1021b6142ded7ea9e0 to your computer and use it in GitHub Desktop.
Save vestjoe/9fca7b094df61e1021b6142ded7ea9e0 to your computer and use it in GitHub Desktop.

SSHFS

sshfs is a filesystem based on the SSH file transfer protocol. It can be very useful to stand up an ADHOC file repository.

Reference:

http://www.ubuntux.org/fuse-sshfs/

Installation (Debian/Ubuntu)

apt-get update && apt-get upgrade sudo apt-get install sshfs

Mounting the remote file system

Syntax

sshfs user@server /path/to/mountpoint sshfs user@server /path/to/mountpoint options

1) Create a local directory to mount the remote files

mkdir /mnt/remote

Add your user to the fuse group

sudo adduser yourlocalusername fuse

2) Mount the remote share

sshfs yourremoteusername@remotehost: mountpoint

example

sshfs bob@192.168.100.100:/ /mnt/remote/

or with a key

sshfs -o IdentityFile=~/.ssh/keyfile /mnt/remote

Unmount

fusermount -u mountpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment