nevaforget d01a358f35
Update PKGBUILD version / update-pkgver (push) Successful in 3s
refactor: harden ssh_config handling, mount path, and CLI UX from audit findings
Three rounds of audit-driven hardening, fully documented in DECISIONS.md:

- argv hardening: validate HostName/User/IdentityFile via allowlist regexes,
  parse Port via strconv.Atoi, surface ssh_config parse errors instead of
  silently swallowing them. Switch -o kernel_cache to auto_cache for network-
  FS correctness, pin StrictHostKeyChecking=accept-new.
- LOW-severity cleanup: -v verbose flag (default output is just the mount
  path), run_editor returns errors and main exits 7 on failure, ABOUTME
  headers, golang.org/x/sys v0.43.0 (go 1.25.0).
- Defense-in-depth + UX: rxIdentityFile first-character anchor rejects
  leading "-"/"."/":"/etc., verify_mount_dir resolves base via EvalSymlinks
  and refuses pre-existing symlinks at the mount path, flag.Usage shows the
  positional <Host> argument, run_editor uses cmd.Start() so cold-start
  Sublime does not block the terminal.
- CI: empty-PKGVER guard in update-pkgver workflow.
- Tests: verify_mount_dir path-traversal + symlink-reject coverage,
  rxHostUser/rxIdentityFile boundary cases.
2026-04-26 11:24:45 +02:00
2026-04-26 10:38:06 +02:00

Quickly mount remote systems via SSHFS based on your ssh_config

Static mount dir is currently ~/Servers/<Host>

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)

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
S
Description
Quickly mount remote systems via SSHFS based on your ssh_config
Readme MIT 2.1 MiB
Languages
Go 100%