Conversation
There was a problem hiding this comment.
Pull request overview
Adds end-to-end SSH key selection/management so server connections (terminal, SFTP, and key deployment) can use a configured private key via IdentityFile, plus a new UI for managing keys under ~/.ssh.
Changes:
- Extend
SshHost+ SSH config parsing/writing to persistIdentityFileasidentity_file. - Update connection flows (VTE ssh, SFTP, and new pubkey deployment) to attempt key-based auth first, then fall back to password/agent.
- Implement the SSH Keys management screen (list/import/generate/delete/deploy).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/config_observer.rs | Adds identity_file to host model and parses/writes IdentityFile in SSH config. |
| src/sftp_engine.rs | Attempts SFTP auth via configured key, then password, then agent. |
| src/ssh_engine.rs | Adds deploy_pubkey and key/password/agent auth fallback for deployments. |
| src/ui/add_server_dialog.rs | Adds SSH key dropdown and saves the selected key path into host config. |
| src/ui/window.rs | Uses -i when launching terminal SSH sessions; wires in SSH keys UI screen. |
| src/ui/ssh_keys.rs | New SSH keys management UI (list/import/generate/delete/deploy). |
| src/ui/mod.rs | Exposes the new ssh_keys module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/Cleboost/Rustmius/sessions/68ea6773-dc5f-474f-bc60-75bb94e4466f Co-authored-by: Cleboost <61158869+Cleboost@users.noreply.github.com>
…zed_keys Agent-Logs-Url: https://github.com/Cleboost/Rustmius/sessions/68ea6773-dc5f-474f-bc60-75bb94e4466f Co-authored-by: Cleboost <61158869+Cleboost@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/Cleboost/Rustmius/sessions/c392e926-6a18-41c7-8027-23bf1860b74a Co-authored-by: Cleboost <61158869+Cleboost@users.noreply.github.com>
…ul fallback Agent-Logs-Url: https://github.com/Cleboost/Rustmius/sessions/c392e926-6a18-41c7-8027-23bf1860b74a Co-authored-by: Cleboost <61158869+Cleboost@users.noreply.github.com>
All review comments addressed in commits
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive SSH key management, allowing users to generate, import, delete, and deploy SSH keys to remote servers. The SshHost configuration has been expanded to support the IdentityFile property, and both the SFTP and SSH engines now prioritize key-based authentication and SSH agent usage over passwords. Additionally, the UI has been updated with a dedicated SSH keys management view and a key selection dropdown in the server configuration dialog. Review feedback identifies a potential data loss risk during key import due to missing file-existence checks, a lack of atomicity when writing to the SSH configuration file, and the absence of a connection timeout when establishing TCP streams.
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive SSH key management, enabling users to generate, import, and deploy SSH keys directly within the application. The SshHost configuration now includes an identity_file field, which is integrated into the SFTP and terminal connection logic to support key-based authentication alongside the SSH agent and password methods. The UI has been updated with a dedicated SSH keys management view and an enhanced server dialog for key selection. Review feedback highlights critical security improvements for key file creation on Unix systems and the need for more robust checks to prevent accidental file overwrites during key generation and import.
This pull request adds support for selecting and using SSH private keys for server connections throughout the application. The changes include updating the SSH host configuration to store an identity file, updating the UI to allow users to pick a key when adding or editing servers, and ensuring that SSH and SFTP connections use the selected key if provided. Additionally, the SSH keys management UI is now implemented.
Key changes:
SSH host configuration and parsing:
identity_filefield to theSshHoststruct and updated SSH config parsing and writing to support theIdentityFileoption. [1] [2] [3] [4]Connection logic (SFTP/SSH):
deploy_pubkeyfunction for deploying public keys to remote servers, supporting all authentication methods.User interface enhancements:
-ioption if a key is specified for the host.SSH key management UI:
These changes provide users with more flexible and secure authentication options when connecting to servers.