AutoFS & SSHFS Remote Architecture
This documentation covers the automated, on-demand secure shell file system (SSHFS) mounting configuration for remote nodes (e.g., linux-shell.se) using AutoFS inside a high-performance Gentoo Linux environment running OpenRC.
Security & Permissions Prerequisites
SSH Key Context & Directory Permissions
OpenSSH enforces strict ownership rules. Because the AutoFS daemon executes within a system context as root, all identity files and directory permissions must be explicitly restricted to UID 0 (root).
Configuration Files
1. Master Map Configuration
/etc/autofs/auto.master
Append the following mount baseline configuration to your master map. This maps the /mnt/server prefix to the isolated SSHFS map file, enabling ghost placeholders and a 60-second structural prune timeout.
2. Automount SSHFS Storage Map
Mount Paths
The configuration map utilizes raw FUSE interaction via the internal AutoFS parser. Spaces within the ssh_command sub-arguments are explicitly escaped (\) to avoid block column misinterpretations.
Service Administration
Initialization Sequence (OpenRC)
Set standard text file security contexts before forcing the AutoFS orchestration daemon to reload its configuration maps.
Validation & Verification
Passive Monitoring & Functional Testing
To verify that the configuration is working passively without spawning persistent background tasks, check the kernel routing map or live process state tree.