Currently, bssh's SSH config parser only supports space-separated syntax (Option Value) and not the equals-sign syntax (Option=Value) that OpenSSH also supports. This causes parse failures for valid SSH configs.
Current Behavior
- Parser only handles:
HostKeyAlgorithms +ssh-rsa
- Parser fails on:
HostKeyAlgorithms=+ssh-rsa
- Unknown option warnings for:
UseKeychain, PubkeyAcceptedKeyTypes, IdentitiesOnly=yes
Expected Behavior
- Support both
Option Value and Option=Value syntax
- Add support for commonly used but missing options
Issues Found
1. Syntax Limitation
- Current parser splits on whitespace only (parser.rs:40-46)
- OpenSSH supports both formats
- Real user configs fail to parse
2. Missing Options (high priority)
PubkeyAcceptedAlgorithms (modern name for PubkeyAcceptedKeyTypes)
UseKeychain (macOS-specific but widely used)
IgnoreUnknown (important for cross-platform configs)
AddKeysToAgent
IdentityAgent
3. Coverage
- bssh: 42/103 options (~41%)
- Missing 61 OpenSSH options
Proposed Solution
1. Update parser to handle both syntaxes
// Support both:
// IdentitiesOnly yes
// IdentitiesOnly=yes
2. Add support for priority options
- PubkeyAcceptedAlgorithms
- AddKeysToAgent
- IgnoreUnknown
- UseKeychain (with macOS detection)
- IdentityAgent
3. Consider adding Match directive support
For advanced configs with conditional logic
Files to Modify
src/ssh/ssh_config/parser.rs - Add equals-sign parsing
src/ssh/ssh_config/types.rs - Add new option fields
src/ssh/ssh_config/resolver.rs - Handle new options
References
Priority
Medium-High (affects real-world SSH config compatibility)
Currently, bssh's SSH config parser only supports space-separated syntax (
Option Value) and not the equals-sign syntax (Option=Value) that OpenSSH also supports. This causes parse failures for valid SSH configs.Current Behavior
HostKeyAlgorithms +ssh-rsaHostKeyAlgorithms=+ssh-rsaUseKeychain,PubkeyAcceptedKeyTypes,IdentitiesOnly=yesExpected Behavior
Option ValueandOption=ValuesyntaxIssues Found
1. Syntax Limitation
2. Missing Options (high priority)
PubkeyAcceptedAlgorithms(modern name for PubkeyAcceptedKeyTypes)UseKeychain(macOS-specific but widely used)IgnoreUnknown(important for cross-platform configs)AddKeysToAgentIdentityAgent3. Coverage
Proposed Solution
1. Update parser to handle both syntaxes
2. Add support for priority options
3. Consider adding Match directive support
For advanced configs with conditional logic
Files to Modify
src/ssh/ssh_config/parser.rs- Add equals-sign parsingsrc/ssh/ssh_config/types.rs- Add new option fieldssrc/ssh/ssh_config/resolver.rs- Handle new optionsReferences
Priority
Medium-High (affects real-world SSH config compatibility)