x/crypto/ssh/knownhosts: fails to find key when port = "ssh" #44668
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
net.Dial and ssh.Dial allow specifying ports by name. e.g.
host.example.com:ssh
. This fails in combination withknownhosts
.What did you expect to see?
I expect for the knownhost entry for host.example.com to be found.
What did you see instead?
ssh: handshake failed: knownhosts: key is unknown
If the port is specified numerically it succeeds. e.g.
host.example.com:22
The text was updated successfully, but these errors were encountered: