Bug 476081 - ip wildcard in known_hosts not functional
Summary: ip wildcard in known_hosts not functional
Status: REPORTED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: SFTP (other bugs)
Version First Reported In: 21.12.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-25 11:38 UTC by Jiri Prchal
Modified: 2024-01-24 01:07 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prchal 2023-10-25 11:38:25 UTC
ssh / sftp could have wildcards in file known_hosts for bunch of servers with same key, aka:
[10.*.*.*,172.22.*.*,!172.22.16.1]:1022 ssh-ed25519
But when I connect from krusader to such a server, a new key must be accepted and is added to the file:
[172.22.20.24]:1022 ssh-ed25519
Also shouldn't it use known_hosts2 as ssh uses?
Comment 1 Pedro V 2024-01-24 01:07:09 UTC
It's quite likely an upstream shortcoming as the SFTP KIO slave uses libssh which seems to neglect a lot of "convenience" features.
For example what you want to achieve here could be also done with HostKeyAlias, but that isn't supported either.

Apparently it doesn't use known_hosts2 by default, but surprisingly it supports the UserKnownHostsFile option, so you can request that to be also used in your SSH config file.