Bug 444862 - ksshaskpass can not parse "The authenticity of host can't be established." message from OpenSSH
Summary: ksshaskpass can not parse "The authenticity of host can't be established." me...
Status: CONFIRMED
Alias: None
Product: ksshaskpass
Classification: Applications
Component: general (show other bugs)
Version: 5.23.2
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Jeremy Whiting
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2021-11-03 01:10 UTC by Nogweii
Modified: 2024-06-27 12:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nogweii 2021-11-03 01:10:53 UTC
SUMMARY
Connecting to a remote host that is not already known produces a prompt sent to the askpass program that ksshaskpass does not recognize. It's not unusable, I can type "yes" or "no" into the text field, but it does produce a slightly annoying line of text in the console:

    ksshaskpass: Unable to parse phrase "The authenticity of host 'github.com (140.82.113.3)' can't be established.\nRSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes/no/[fingerprint])? "


STEPS TO REPRODUCE
1. Have an empty ~/.ssh/known_hosts
2. export SSH_ASKPASS=/usr/bin/ksshaskpass SSH_ASKPASS_REQUIRE=prefer
3. ssh git@github.com

OBSERVED RESULT
The line of text is produced

EXPECTED RESULT
ksshaskpass knows how to handle this question/prompt from OpenSSH

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux on kernel version 5.14.15-arch-1
(available in About System)
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
OpenSSH Version: OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021
Comment 1 Malte S. Stretz 2023-12-12 13:20:10 UTC
Still affects 5.27.10. Fixing this should be rather trivial by adding a pattern in https://github.com/KDE/ksshaskpass/blob/v5.27.10/src/main.cpp#L37