Skip to content

feat: machine-specific SSH key loading via IfDevice entry string#440

Open
steffen-heil wants to merge 1 commit into
dlech:masterfrom
steffen-heil:feature/machine-specific-loading
Open

feat: machine-specific SSH key loading via IfDevice entry string#440
steffen-heil wants to merge 1 commit into
dlech:masterfrom
steffen-heil:feature/machine-specific-loading

Conversation

@steffen-heil

Copy link
Copy Markdown

Summary

  • SSH keys in KeeAgent can now be restricted to specific machines by setting an IfDevice custom string field on the KeePass entry
  • Compatible with the KeeAutoExec plugin — both read the same field
  • Empty IfDevice (or field absent) → load on all machines, no change to existing behaviour
  • Supports comma-separated patterns, !Hostname exclusions, * wildcards, and //regex// syntax (same as KeePass AutoType window filter)

Usage

In the KeePass entry dialog, go to the Advanced tab and add a string field:

Name Value Effect
IfDevice MY-PC Load only on MY-PC
IfDevice PC1,PC2 Load on PC1 or PC2
IfDevice !WORK-PC Load everywhere except WORK-PC
IfDevice LAPTOP* Load on machines matching wildcard

Changes

  • KeeAgentExt.cs: reads entry.Strings.ReadSafe("IfDevice") at database open, skips entry if current machine doesn't match

🤖 Generated with Claude Code

@steffen-heil steffen-heil force-pushed the feature/machine-specific-loading branch 2 times, most recently from 00ccfae to 73b6725 Compare June 17, 2026 14:01
Read the KeeAutoExec-compatible "IfDevice" custom string field to
control which machines auto-load a key on database open. Supports
comma-separated hostnames, ! negation, * wildcards and //regex//.

Also adds build scripts with auto-deploy to KeePass Plugins folder.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@steffen-heil steffen-heil force-pushed the feature/machine-specific-loading branch from 73b6725 to db0f634 Compare June 17, 2026 14:04
@steffen-heil

Copy link
Copy Markdown
Author

Any chance this will be merged?

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.

2 participants