Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sshfs-control

Small SSHFS mount helper for local Linux machines.

It keeps named mount targets in one config file and exposes the common SSHFS operations through make or the bin/mountfs wrapper.

Purpose

This application is for machines where the same remote paths are mounted repeatedly with SSHFS. The repository keeps the commands and examples tracked, while real hostnames, usernames and local paths stay in config/mounts.local.mk.

Features

  • Named mount targets
  • Makefile-based command backend
  • Simple CLI wrapper
  • Local override config model
  • Clean git workflow for infrastructure tooling

Roadmap

  • Support multiple servers and per-target SSH aliases
  • Add read-only target support
  • Add batch mount and unmount operations
  • Add prerequisite checks for sshfs and fusermount
  • Optional systemd user integration

Project structure

sshfs-control/
├── Makefile
├── README.md
├── LICENSE
├── DECISIONS.md
├── .gitignore
├── bin/
│   └── mountfs
├── config/
│   └── mounts.example.mk
└── docs/
    └── usage-guide.md

Requirements

  • Linux
  • make
  • sshfs
  • mountpoint
  • fusermount or fusermount3

Install dependencies on Ubuntu or Debian:

sudo apt update
sudo apt install sshfs

Quick start

Clone the repository:

git clone https://github.com/X4ApM7DV/sshfs-control.git
cd sshfs-control

Create local configuration from the example file:

cp config/mounts.example.mk config/mounts.local.mk

Edit your local configuration:

nano config/mounts.local.mk

Make the CLI wrapper executable:

chmod +x bin/mountfs

Run a basic health check:

make doctor

Mount a target:

make mount TARGET=web

Or use the wrapper:

bin/mountfs mount web

Optional: add to your PATH

If you want to run mountfs from anywhere, you can add it to your PATH.

Example:

ln -s /path/to/sshfs-control/bin/mountfs ~/.local/bin/mountfs

Make sure the destination directory is in your PATH.

Configuration

Tracked:

config/mounts.example.mk

Ignored:

config/mounts.local.mk

Keep real hostnames, usernames and personal filesystem paths in the ignored local file.

You can define per-target SSHFS options using SSHFS_OPTS_<target>.

Example commands

make list-targets
make print-config TARGET=web
make mount TARGET=web
make status TARGET=web
make ls TARGET=web
make unmount TARGET=web
make remount TARGET=web

Using the wrapper:

bin/mountfs list
bin/mountfs config web
bin/mountfs mount web
bin/mountfs status web
bin/mountfs ls web
bin/mountfs unmount web
bin/mountfs remount web

Adding a target

Add the target name to TARGETS:

TARGETS ?= web home logs

Then define the matching variables:

REMOTE_PATH_logs := /var/log/
LOCAL_DIR_logs := $(LOCAL_BASE)/logs

Use it:

bin/mountfs mount logs

License

MIT

About

SSHFS-based remote mount control tool with Makefile-driven operations, CLI wrapper and local override config for safe infrastructure workflows.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages