SSH file system share

Command

sshfs [options] <user>@<host>:<source_path> <mount_point> 

Usage

sshfs -o ro -o allow_other user@host:/remote/path /local/mount/point

Automation

  • Add to /etc/fstab to mount on startup:

    • file system: <user>@<host>:<path>
    • mount point: <mount_point>
    • type: fuse.sshfs
    • options: e.g identityFile=<path>, allow_other, defaults, default_permissions, idmap=user etc.
    • dump: 0
    • pass: 0

    Example

    • user@host:/remote/path /mnt/remote fuse.sshfs identityfile=/home/user/.ssh/id_ed25519,allow_other,defaults,default_permissions,idmap=user 0 0

See also: MOC Computing DevOps and Software