
fork of the popular jsch library
See original README
As I explained in a blog post the main points are:
Not much. Check the example code in the examples folder. And there are some wiki pages, i.e. Jsch-Configuration and Jsch-Logging.
Up until 0.2.26 the versioning followed the original jsch scheme, from 2.27.0 on, we switched to semantic versioning, expressing that the library api is stable and used in production.
com.jcraft:jschMake sure, that you only have one jsch dependency on your classpath. For example you can check the output of mvn dependency:tree.
replace
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
with
<dependency>
<groupId>com.github.mwiede</groupId>
<artifactId>jsch</artifactId>
<version>2.28.0</version>
</dependency>
When you have an artifact foo:bar, which contains com.jcraft:jsch as a transitive dependency, you need to add com.github.mwiede:jsch as another dependency and exclude the jcraft one:
<dependency>
<groupId>com.github.mwiede</groupId>
<artifactId>jsch</artifactId>
<version>2.28.0</version>
</dependency>
<dependency>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<exclusions>
<exclusion>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
</exclusion>
</exclusions>
</dependency>
Addition: You can further exclude any of com.jcraft:jsch.agentproxy.jsch, com.jcraft:jsch.agentproxy.core or com.jcraft:jsch.agentproxy.pageant, because these modules where integrated in this fork (see release notes of 0.1.66).
jsch.server_host_key + jsch.client_pubkey properties.JSch.setConfig("server_host_key", JSch.getConfig("server_host_key") + ",ssh-rsa") + JSch.setConfig("PubkeyAcceptedAlgorithms", JSch.getConfig("PubkeyAcceptedAlgorithms") + ",ssh-rsa").session.setConfig("server_host_key", session.getConfig("server_host_key") + ",ssh-rsa") + session.setConfig("PubkeyAcceptedAlgorithms", session.getConfig("PubkeyAcceptedAlgorithms") + ",ssh-rsa").jsch.kex
JSch.setConfig("kex", "...")jsch.server_host_key
JSch.setConfig("server_host_key", "...")jsch.prefer_known_host_key_types
JSch.setConfig("prefer_known_host_key_types", "...")jsch.enable_server_sig_algs
JSch.setConfig("enable_server_sig_algs", "...")jsch.cipher
See ChangeLog.md
OpenSSHConfig class.JSch.setConfig("cipher.s2c", "...") + JSch.setConfig("cipher.c2s", "...")jsch.mac
JSch.setConfig("mac.s2c", "...") + JSch.setConfig("mac.c2s", "...")jsch.compression
JSch.setConfig("compression.s2c", "...") + JSch.setConfig("compression.c2s", "...")jsch.lang
JSch.setConfig("lang.s2c", "...") + JSch.setConfig("lang.c2s", "...")jsch.dhgex_min
JSch.setConfig("dhgex_min", "...")jsch.dhgex_max
JSch.setConfig("dhgex_max", "...")jsch.dhgex_preferred
JSch.setConfig("dhgex_preferred", "...")jsch.compression_level
JSch.setConfig("compression_level", "...")jsch.preferred_authentications
JSch.setConfig("PreferredAuthentications", "...")jsch.client_pubkey
JSch.setConfig("PubkeyAcceptedAlgorithms", "...")jsch.check_ciphers
JSch.setConfig("CheckCiphers", "...")jsch.check_macs
JSch.setConfig("CheckMacs", "...")jsch.check_kexes
JSch.setConfig("CheckKexes", "...")jsch.check_signatures
JSch.setConfig("CheckSignatures", "...")jsch.fingerprint_hash
JSch.setConfig("FingerprintHash", "...")jsch.max_auth_tries
JSch.setConfig("MaxAuthTries", "...")