3f3c631057
Update PKGBUILD version / update-pkgver (push) Successful in 3s
Aligns with XDG Base Directory spec: $XDG_RUNTIME_DIR is the defined
location for non-essential runtime files (ephemeral, user-owned,
session-scoped). sshfs mounts fit that definition exactly, and the
tmpfs backing means orphaned mountpoint dirs vanish on logout instead
of accumulating.
- verify_mount_dir reads $XDG_RUNTIME_DIR, falls back to
/run/user/<uid>/ via os.Getuid().
- Existing path-traversal guard and symlink rejection carry over
unchanged.
- Tests switched from t.Setenv("HOME") to t.Setenv("XDG_RUNTIME_DIR").
File-manager sidebar visibility is unaffected — gvfs surfaces FUSE
mounts via /proc/mounts regardless of mountpoint location.
56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
Quickly mount remote systems via SSHFS based on your ssh_config
|
|
|
|
Mounts land under `$XDG_RUNTIME_DIR/sshfs/<Host>` (typically `/run/user/$UID/sshfs/<Host>`), using the ssh_config alias as label, not the resolved IP. The directory is auto-cleaned on logout (tmpfs).
|
|
|
|
# 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
|
|
|
|
- [SSHFS](https://wiki.archlinux.org/title/SSHFS)
|
|
- [Go](https://wiki.archlinux.org/title/Go) >= 1.25 (build-time)
|
|
|
|
# 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](https://gitea.moonarch.de/nevaforget/sshfs_connect/issues/1)
|
|
|
|
# Example ssh config
|
|
|
|
See https://wiki.archlinux.org/title/OpenSSH#Configuration
|
|
|
|
```
|
|
Host myserver
|
|
HostName 127.0.0.1
|
|
User sshusername
|
|
IdentityFile ~/.ssh/id_rsa
|
|
```
|