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.
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.
- Named mount targets
- Makefile-based command backend
- Simple CLI wrapper
- Local override config model
- Clean git workflow for infrastructure tooling
- 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
sshfs-control/
├── Makefile
├── README.md
├── LICENSE
├── DECISIONS.md
├── .gitignore
├── bin/
│ └── mountfs
├── config/
│ └── mounts.example.mk
└── docs/
└── usage-guide.md
- Linux
makesshfsmountpointfusermountorfusermount3
Install dependencies on Ubuntu or Debian:
sudo apt update
sudo apt install sshfsClone the repository:
git clone https://github.com/X4ApM7DV/sshfs-control.git
cd sshfs-controlCreate local configuration from the example file:
cp config/mounts.example.mk config/mounts.local.mkEdit your local configuration:
nano config/mounts.local.mkMake the CLI wrapper executable:
chmod +x bin/mountfsRun a basic health check:
make doctorMount a target:
make mount TARGET=webOr use the wrapper:
bin/mountfs mount webIf 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/mountfsMake sure the destination directory is in your PATH.
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>.
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=webUsing 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 webAdd the target name to TARGETS:
TARGETS ?= web home logsThen define the matching variables:
REMOTE_PATH_logs := /var/log/
LOCAL_DIR_logs := $(LOCAL_BASE)/logsUse it:
bin/mountfs mount logsMIT