Bug 444862

Summary: ksshaskpass can not parse "The authenticity of host can't be established." message from OpenSSH
Product: [Applications] ksshaskpass Reporter: Nogweii <me+kdebugs>
Component: generalAssignee: Jeremy Whiting <jpwhiting>
Status: RESOLVED FIXED    
Severity: minor CC: marek.schimara, mss, qwerty287, taras.oleksyn
Priority: NOR Keywords: junior-jobs
Version First Reported In: 5.23.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=485418
Latest Commit: Version Fixed/Implemented In: 6.6
Sentry Crash Report:

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
Comment 2 Marek 2025-10-09 12:19:10 UTC
Still affects 6.4.4.
Comment 3 Taras Oleksyn 2025-10-11 06:26:42 UTC
On it: https://invent.kde.org/plasma/ksshaskpass/-/merge_requests/31
Comment 4 David Edmundson 2025-10-13 10:56:41 UTC
Git commit 4b7856dc490a5f6c9c995766bfe56a12111bb5b6 by David Edmundson, on behalf of Taras Oleksyn.
Committed on 13/10/2025 at 10:56.
Pushed by davidedmundson into branch 'master'.

Add pattern matching for the unknown SSH host key case:

The authenticity of host 'github.com (140.82.113.3)' can't be established...
FIXED-IN: 6.6

M  +36   -4    src/main.cpp

https://invent.kde.org/plasma/ksshaskpass/-/commit/4b7856dc490a5f6c9c995766bfe56a12111bb5b6