问题 Since connection creation takes up quite a few times, and I'd like to connect to multiple hosts, I started to use JSch from multiple threads. However I get some nasty exceptions, which I think is because of JSch being not thread-safe. How should I use it, that it not throws any exception, which is due to the not-thread-safety of JSch? Stacktrace: com.jcraft.jsch.JSchException: connection is closed by foreign host at com.jcraft.jsch.Session.connect(Session.java:269) at com.jcraft.jsch.Session