Bug 8536 - Client reports "Malformed host key"
Summary: Client reports "Malformed host key"
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Agent (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-27 11:10 CET by Pierre Ossman
Modified: 2025-04-24 09:20 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2025-02-27 11:10:13 CET
We've started getting this in the client log when connecting:

> 2025-02-27T10:55:21: Malformed host key
> 2025-02-27T10:55:21: Ignoring allowed host key

The reason is that the agent is claiming that "SSH-2.0-OpenSSH_9.8" is a valid host key.

The cause of this is because the output of ssh-keyscan also includes comments:

> # 127.0.0.1:22 SSH-2.0-OpenSSH_9.8
> 127.0.0.1 ssh-rsa AAAAB3...

vsmagent is gobbling up those comments and treats them as host keys.

The reason is the compatibility fix in r40780 for bug 7657 in ThinLinc 4.17.0. There is a too broad "except" clause that is hiding parsing errors.
Comment 1 Pierre Ossman cendio 2025-03-04 13:18:00 CET
There are no practical issues because of this, besides the scary log message. All the correct host keys are still included.
Comment 2 Pierre Ossman cendio 2025-04-24 09:20:25 CEST
On some systems you can also get annoying logs on the agent:

> 2025-04-22 12:02:40 INFO vsmagent: VSM agent version 4.18.0 build 3877 started
> 2025-04-22 12:02:40 INFO vsmagent: My public hostname is 10.20.40.30
> 2025-04-22 12:02:40 WARNING vsmagent: Error parsing SSH key: # 127.0.0.1:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.11
> 2025-04-22 12:02:40 WARNING vsmagent: Error parsing SSH key: # 127.0.0.1:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.11
> 2025-04-22 12:02:40 WARNING vsmagent: Error parsing SSH key: # 127.0.0.1:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.11
> 2025-04-22 12:02:40 WARNING vsmagent: Error parsing SSH key: # 127.0.0.1:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.11
> 2025-04-22 12:02:40 WARNING vsmagent: Error parsing SSH key: # 127.0.0.1:22 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.11

Note You need to log in before you can comment on or make changes to this bug.