feat(ssh): add saved connection profiles - #2717
Closed
Pedro-Jesus-Fuentes-Morcillo wants to merge 1 commit into
Closed
feat(ssh): add saved connection profiles#2717Pedro-Jesus-Fuentes-Morcillo wants to merge 1 commit into
Pedro-Jesus-Fuentes-Morcillo wants to merge 1 commit into
Conversation
Store SSH connection profiles (name, host, port, user, password) persistently in bruceConfig. The SSH menu now offers New Connection and Saved Profiles. Selecting a saved profile opens Connect/Delete, and new profiles can be added from the same menu. Related to BruceDevices#1739, BruceDevices#2590
Member
|
sorry but we will never store plaintext ssh host, user and password this is even a vuln o.o bad idea! |
Member
|
i would be cool if the SSH profiles were fetched "lazyly", only when needed.. otherwise it'll be using reserved RAM from start to turn off.. I mean do not store all credentials on startup,
in a scenario with many connection profiles, it can make the difference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Adds persistent SSH connection profiles so users no longer have to retype the connection details every time. Profiles (name, host, port, user, password) are stored in
bruceConfigand persisted to/bruce.conf.The SSH entry now opens a small menu:
On the config side, a new
sshProfilesarray is added.addSSHProfileupserts by name to avoid duplicates andremoveSSHProfiledeletes by name. The manual and profile connect paths share a commonssh_start_session()helper to avoid duplicated logic.Types of Changes
New Feature.
Verification
Tested on a LilyGo T-Embed CC1101 Plus. Add a profile and confirm it survives a reboot, connect from a saved profile, and delete a profile. Back navigation at each menu level returns to the previous menu correctly. The configuration saved correctly to
/bruce.conf.Testing
This was verified manually on hardware. Compiles across all board environments.
Linked Issues
Related to #1739 and #2590.
User-Facing Change
Further Comments
The password is saved as plain text in the device config. This is less secure, but many of these devices have no real keyboard, so you have to enter each character with the buttons or the wheel, which is slow and easy to get wrong. Saving the password is much more comfortable. If you prefer not to save it, the profile can be changed to store only the connection details and ask for the password when connecting.
I am also working on SSH key generation on the device, as asked in #2590. It will be a separate PR that extends these profiles to support key-based login.