darkoperator / darkoperator/Posh-SSH
No port discrimination in key checks
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
If you connect to a remote server, it is not discriminated between different ports.
Please see my .ssh\known_hosts from the OpenSSH client (a bit anonymized):
[hlgXXXX]:22011,[172.16.xx.xx]:22011 ecdsa-sha2-nistp256 AAAAE2VjZHNhLX[...]
[hlgXXXX]:22012,[172.16.xx.xx]:22012 ssh-rsa AAAAB3NzaC1yc2EAAAADAQ[...]
and the .poshssh\hosts.json for comparison (also anonymized):
{
"Keys": {
"HLGXXXX": {
"HostKeyName": "ssh-ed25519",
"Fingerprint": "7f:ce:4b:...:f6"
},
"hlgXXXX": {
"HostKeyName": "ssh-rsa",
"Fingerprint": "66:e1:93:...:0"
}
}
}
<No port entry can be found here when addressing 2 different servers by same host name (or IP) but different ports.
Additionally: Once the host name is written with capital and once with small letters (for Windows host names all the same), so host name with capital letters to port 22011 runs through, host name with small letters and port 22011 throws a SecurityError.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the module reads and matches entries in .poshssh\hosts.json, comparing those lookups with the port-qualified entries shown from .ssh\known_hosts. Done means host-key checks distinguish the same host or IP on different ports and handle the reported capitalization consistently; add or run the relevant existing checks if the repository provides them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100