When the known_hosts file gets corrupted due to certain reasons (such as concurrent SSH writes), Such as:
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 |
When the known_hosts file gets corrupted due to certain reasons (such as concurrent SSH writes), Such as:
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:
mina-sshd/sshd-common/src/main/java/org/apache/sshd/client/config/hosts/KnownHostEntry.java
Line 206 in c10dbcd