fix(net_ssh): use filename parameter instead of hardcoded RSA path in bind_key#57
Merged
InterLinked1 merged 1 commit intoJun 6, 2026
Conversation
… bind_key bind_key() was always passing KEYS_FOLDER "ssh_host_rsa_key" to ssh_bind_options_set() regardless of which key type was being bound. This caused net_ssh to fail to start on systems with only ed25519 (or ecdsa/dsa) keys and no RSA key present.
Owner
|
This smells like an AI pull request. Did you actually investigate/test any of this? |
Contributor
Author
The PR body is AI written yes (no shame), but, of course I tested it, as that is how I was able to get this to work regardless :P you can review the change yourself as it's a pretty common sense change. |
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.
Bug
bind_key()innets/net_ssh.c(line 112) passes a hardcodedKEYS_FOLDER "ssh_host_rsa_key"tossh_bind_options_set()regardless of thefilenameargument, causing all non-RSA key types to fail to load.Current code
Expected
Impact
If the system only has an ed25519 key (no RSA key),
net_sshfails to start with:The
eaccess()check passes for the ed25519 key, but thenssh_bind_options_setis called with the RSA path which doesn't exist, so it silently fails and returns 0 keys bound.Environment
[keys]with onlyed25519 = yes, rsa/dsa/ecdsa = noFix
One-line change — replace the hardcoded string with the
filenameparameter on line 112.