sshj
sshj copied to clipboard
Could not load known_hosts inside of docker
Hi Hierynomus,
it always throws an exception when running inside of a docker
ssh.loadKnownHosts();
java.io.IOException: Could not load known_hosts at net.schmizz.sshj.SSHClient.loadKnownHosts(SSHClient.java:650)
can we somehow fix this?
thx for all the efforts in advance ...
Do you have a .ssh/known_hosts file? if not don't call loadKnownHosts. Use: ssh.addHostKeyVerifier(PromiscuousVerifier()) basically all hosts will be verified . for more security create a known_hosts file