[JSch-users] Multiple known_hosts files and a default
Status: Alpha
Brought to you by:
ymnk
From: Rodney B. <mai...@ro...> - 2011-03-24 04:58:12
|
I looked at the source code and the JavaDoc, but I didn't see how one could specify multiple known_hosts files like openssh uses. Also is there a default known_hosts (ex: ~/.ssh/known_hosts or System.getProperty("user.home") + "/.ssh/known_hosts") when one isn't specified? I want to accept hosts in System.getProperty("user.home") + "/.ssh/known_hosts" OR /etc/ssh/ssh_known_hosts I guess I could read both files into an in-memory InputStream and pass that as well. I'd have to be careful about the \n when merging them though I suppose. If this doesn't already exist it should be a feature enhancement. Perhaps an api like: jsch.setKnownHosts(final File[] known_hosts) |