Skip to content

feat(ssh): add saved connection profiles - #2717

Closed
Pedro-Jesus-Fuentes-Morcillo wants to merge 1 commit into
BruceDevices:devfrom
Pedro-Jesus-Fuentes-Morcillo:feat/ssh-profiles
Closed

feat(ssh): add saved connection profiles#2717
Pedro-Jesus-Fuentes-Morcillo wants to merge 1 commit into
BruceDevices:devfrom
Pedro-Jesus-Fuentes-Morcillo:feat/ssh-profiles

Conversation

@Pedro-Jesus-Fuentes-Morcillo

Copy link
Copy Markdown
Contributor

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 bruceConfig and persisted to /bruce.conf.

The SSH entry now opens a small menu:

  • New Connection: keeps the existing manual flow typing host, port, user and password.
  • Saved Profiles: lists the stored profiles plus Add Profile. Selecting a profile opens Connect / Delete.

On the config side, a new sshProfiles array is added. addSSHProfile upserts by name to avoid duplicates and
removeSSHProfile deletes by name. The manual and profile connect paths share a common
ssh_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

Add saved SSH connection profiles (name, host, port, user, password) with a menu to connect to, add, and delete them.

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.

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
@pr3y

pr3y commented Jul 28, 2026

Copy link
Copy Markdown
Member

sorry but we will never store plaintext ssh host, user and password this is even a vuln o.o bad idea!
a good idea would be to accept local certificates for authentication on ssh, but this no

@pr3y pr3y closed this Jul 28, 2026
@bmorcelli

Copy link
Copy Markdown
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,

  • read bruce.conf and fetch data right before use
  • choose the profile wanted
  • free vector unused entries before starting SSH connection.

in a scenario with many connection profiles, it can make the difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants