Files
sshfs_connect/README.md
T
nevaforget afb51f1d61
Update PKGBUILD version / update-pkgver (push) Successful in 3s
feat: add --remote-dir flag and use ssh alias as mount label
- New `-r` / `--remote-dir` flag to mount a specific remote subdirectory;
  empty default preserves prior home-dir behaviour.
- Validate the flag value via a dedicated `rxRemoteDir` allowlist before it
  reaches the sshfs argv.
- Use the ssh_config alias (not the resolved HostName) as the local
  mountpoint name and as the sshfs source. File managers now show the
  human-readable label instead of the raw IP.
- Validate `args[0]` against `rxHostUser` since it now flows into argv.
- Rename `verify_mount_dir` parameter `hostname -> name` and `mount_sshfs`
  first parameter `hostname -> alias` for clarity.
2026-04-28 15:39:17 +02:00

1.2 KiB

Quickly mount remote systems via SSHFS based on your ssh_config

Static mount dir is currently ~/Servers/<Host> (uses the ssh_config alias as label, not the resolved IP).

Install

Arch Linux (Moonarch repo)

Available in the Moonarch package repository as sshfsc-git:

paru -S sshfsc-git

From source

go build -o sshfsc
install -Dm755 sshfsc /usr/local/bin/sshfsc

Dependencies

Usage

sshfsc <Host>

Arguments

Flag Description
-e open mountpoint in your editor
-v verbose: print resolved ssh_config fields (HostName, User, Port, IdentityFile)
-r, --remote-dir <path> remote directory to mount (default: remote home)

By default only the resolved mount path is printed. Use -v for the full ssh_config dump.

Editor Sublime-Text (subl) is currently hardcoded. See

Example ssh config

See https://wiki.archlinux.org/title/OpenSSH#Configuration

Host myserver
  HostName 127.0.0.1
  User sshusername
  IdentityFile ~/.ssh/id_rsa