Skip to content

When there are erroneous lines in known_hosts, Mina will write a large amount of duplicate data into the known_hosts file. #827

Description

@zhniu

When the known_hosts file gets corrupted due to certain reasons (such as concurrent SSH writes), Such as:

Image

Mina will throw an exception while parsing the known_hosts file.
Even if there are valid public keys in the known_hosts file, they won't be read out.
This causes the system to write a new public key into the local known_hosts file every time it connects to a server. After running for a long time, this will result in the known_hosts file occupying a very large amount of disk space.

The code:

} catch (RuntimeException | Error e) { // TODO consider consulting a user callback

Metadata

Metadata

Assignees

Labels

enhancementA suggestion for improving an existing feature.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions