22

I am trying to kick the tires of JSch and SSH connect to remote (Solaris) host from Java locally. I normally use PuTTy, which gives me a prompt about an unknown host every time I connect somewhere for the first time, then I say yes and it no longer does it because it stores known hosts in the Win7 registry. But JSch expects a known_hosts file and I am not sure how to make it. I can investigate that later but, for now, I would prefer to skip that step. Does anybody know if it is doable and how?

Grzegorz Żur
  • 47,257
  • 14
  • 109
  • 105
amphibient
  • 29,770
  • 54
  • 146
  • 240

1 Answers1

41

Have you tried the following:

session.setConfig("StrictHostKeyChecking", "no");

From this thread

Brian Agnew
  • 268,207
  • 37
  • 334
  • 440