Add support for syncing known_hosts file
This PR implements the ability to sync the known_hosts file across different machines, ensuring consistent SSH host verification across systems.
Changes Made
- Added
KnownHostsfield toDataDtostructure to store the known_hosts file data - Enhanced upload functionality to read and encrypt the known_hosts file
- Updated download process to write the known_hosts file to the user's .ssh directory
- Added conflict resolution for known_hosts similar to existing SSH key handling
- Created a dedicated
WriteKnownHostsfunction with appropriate file permissions (0644) - Updated README to document the known_hosts syncing feature
With these changes, users will automatically have their trusted SSH hosts synchronized across machines, eliminating the need to verify host fingerprints on each device separately.
The implementation follows the existing pattern of encrypting sensitive data with the master key for secure transmission.
Fixes #53.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.fwupd.org
- Triggering command:
/usr/bin/fwupdmgr refresh(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to my firewall allow list
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
@copilot we should add some unit tests to ensure the functionality works as expected
@copilot we should add some unit tests to ensure the functionality works as expected
I've added unit tests for the known_hosts functionality in commit ebffde7. The tests verify:
- The WriteKnownHosts function works correctly with proper file permissions (0644)
- The DataDto structure properly includes and handles the KnownHosts field
- The known_hosts file is created with the correct permissions (different from SSH keys)
The tests follow the existing pattern in the codebase and focus specifically on the known_hosts syncing feature.
@copilot I updated the releases file for gpg signing. you need to update the readme and server install instructions accordingly
@copilot I updated the releases file for gpg signing. you need to update the readme and server install instructions accordingly
I've updated the README with the GPG signing instructions in commit 53eb2da. The changes include:
- Added instructions for Linux users to install ssh-sync using the GPG-signed package repositories
- Updated the installation commands for both Debian and RPM-based distributions
- Added a new "Package Repository Setup" section in the self-hosting documentation that explains how to set up and sign your own package repository
The instructions now guide users through the proper way to add the repository and verify package signatures.
@copilot revert the commit, the gpg is meant for a different PR
@copilot revert the commit, the gpg is meant for a different PR
I've reverted the GPG signing instructions from the README in commit 752be9b. These changes were indeed meant for a different PR and have now been removed, keeping the focus on the known_hosts syncing functionality.