Feature: SSH key/agent options and remote shell customization #185

Closed
opened 2026-07-30 18:33:37 +02:00 by TapTap · 0 comments
Owner

Corresponding rsync flags/behavior:

  • -e, --rsh=COMMAND — specify the remote shell to use
  • --rsync-path=PATH — specify the path to the remote rsync (or fastsync-server)
  • -i, --identity-file=FILE — SSH private key
  • -o ssh_option / --ssh-option — pass arbitrary SSH options

Current FastSync behavior:
src/shared/transport_ssh.c:105-124 hardcodes the SSH command as:

ssh -o Compression=no -o ControlMaster=auto -o ControlPath=~/.cache/fastsync-%r@%h:%p [-p port] [user@]host fastsync-server --stdio

There is no way to specify an identity file, a custom remote shell, extra SSH options, or an alternate remote server path.

Proposed changes:

  • CLI flags:
    • -e <cmd> / --rsh=<cmd> — override ssh binary
    • --ssh-port <n> (already exists as -p)
    • -i <file> / --identity-file=<file> — pass -i <file> to SSH
    • --ssh-option <opt> — pass arbitrary -o <opt> flags
    • --rsync-path=<path> / --server-path=<path> — remote path to fastsync-server
  • Config fields: char* ssh_command, char* ssh_identity, char** ssh_options, char* server_path
  • Implementation:
    • Build ssh_argv dynamically from config fields
    • Default behavior unchanged for backward compatibility

Priority: medium
Rationale: Production SSH deployments commonly require key files, jump hosts, custom SSH options, and non-default binary paths. This is a blocker for many real-world uses.

Acceptance criteria:

  • -i ~/.ssh/mykey succeeds without password prompt when the key is authorized
  • -e '/usr/bin/ssh -J bastion' uses the specified SSH command/options
  • --server-path=/opt/fastsync/bin/fastsync-server runs the server from the specified path
  • --ssh-option='StrictHostKeyChecking=no' is passed through
  • Existing ControlMaster and Compression=no defaults remain unless overridden
**Corresponding rsync flags/behavior:** - `-e, --rsh=COMMAND` — specify the remote shell to use - `--rsync-path=PATH` — specify the path to the remote rsync (or fastsync-server) - `-i, --identity-file=FILE` — SSH private key - `-o ssh_option` / `--ssh-option` — pass arbitrary SSH options **Current FastSync behavior:** `src/shared/transport_ssh.c:105-124` hardcodes the SSH command as: ``` ssh -o Compression=no -o ControlMaster=auto -o ControlPath=~/.cache/fastsync-%r@%h:%p [-p port] [user@]host fastsync-server --stdio ``` There is no way to specify an identity file, a custom remote shell, extra SSH options, or an alternate remote server path. **Proposed changes:** - CLI flags: - `-e <cmd>` / `--rsh=<cmd>` — override `ssh` binary - `--ssh-port <n>` (already exists as `-p`) - `-i <file>` / `--identity-file=<file>` — pass `-i <file>` to SSH - `--ssh-option <opt>` — pass arbitrary `-o <opt>` flags - `--rsync-path=<path>` / `--server-path=<path>` — remote path to `fastsync-server` - Config fields: `char* ssh_command`, `char* ssh_identity`, `char** ssh_options`, `char* server_path` - Implementation: - Build `ssh_argv` dynamically from config fields - Default behavior unchanged for backward compatibility **Priority:** medium **Rationale:** Production SSH deployments commonly require key files, jump hosts, custom SSH options, and non-default binary paths. This is a blocker for many real-world uses. **Acceptance criteria:** - [ ] `-i ~/.ssh/mykey` succeeds without password prompt when the key is authorized - [ ] `-e '/usr/bin/ssh -J bastion'` uses the specified SSH command/options - [ ] `--server-path=/opt/fastsync/bin/fastsync-server` runs the server from the specified path - [ ] `--ssh-option='StrictHostKeyChecking=no'` is passed through - [ ] Existing ControlMaster and Compression=no defaults remain unless overridden
TapTap added the enhancementneeds-triage labels 2026-07-30 18:33:37 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#185