public class KnownHostEntryReader extends Object
This reader is a bit more robust and tries to handle this case if there is only one colon (otherwise it might be an IPv6 address (without port)), and it skips and logs invalid entries, but still returns all other valid entries from the file.
Modifier and Type | Method and Description |
---|---|
static List<org.apache.sshd.client.config.hosts.KnownHostEntry> |
readFromFile(Path path)
Reads a known_hosts file and returns all valid entries.
|
public static List<org.apache.sshd.client.config.hosts.KnownHostEntry> readFromFile(Path path) throws IOException
path
- of the file to readList
of all valid entries read from the fileIOException
- if the file cannot be read.Copyright © 2019 Eclipse JGit Project. All rights reserved.