-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
The SFTP connection pool currently accepts all SSH host keys without verification, making connections vulnerable to man-in-the-middle attacks.
Current State
- File:
src-tauri/src/locations/sftp/pool.rs:38-43 check_server_key()unconditionally returnsOk(true)- Comment says
// TODO: known_hosts verification
Proposed Changes
- Read
~/.ssh/known_hostson connection - If host key is known and matches → connect silently
- If host key is unknown → show TOFU (trust-on-first-use) dialog to user, save to known_hosts on accept
- If host key changed → show warning dialog with fingerprint comparison, require explicit override
Technical Notes
russh::client::Handler::check_server_keyreceives&PublicKey— this is the hook point- The
russh::keysmodule can parse known_hosts format - Need a Tauri event/window for the TOFU confirmation dialog
- Consider also supporting
~/.ssh/known_hosts2and hashed entries
Acceptance Criteria
- Known hosts are verified on every connection
- Unknown hosts prompt user for TOFU acceptance
- Changed host keys show clear warning
- Accepted keys are persisted to known_hosts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request