To get SSHJ, you have two options:
-
Add a dependency to SSHJ to your project.
-
Build SSHJ yourself.
And, if you want, you can also run the SSHJ examples.
Binary releases of SSHJ are not provided here, but you can download it straight from the Maven Central repository if you want to.
If you’re building your project using Maven, you can add the following dependency to the pom.xml
:
<dependency>
<groupId>com.hierynomus</groupId>
<artifactId>sshj</artifactId>
<version>0.11.0</version>
</dependency>
If your project is built using another build tool that uses the Maven Central repository, translate this dependency into the format used by your build tool.
-
Clone the Overthere repository.
-
Ensure you have Java6 installed with the Unlimited strength Java Cryptography Extensions (JCE).
-
Run the command
./gradlew clean build
.
In the examples
directory, there is a separate Maven project that shows how the library can be used in some sample cases. If you want to run them, follow these guidelines:
-
Install Maven 2.2.1 or up.
-
Clone the Overthere repository.
-
Go into the
examples
directory and run the commandmvn eclipse:eclipse
. -
Import the
examples
project into Eclipse. -
Change the login details in the example classes (address, username and password) and run them!
-
reading known_hosts files for host key verification
-
publickey, password and keyboard-interactive authentication
-
command, subsystem and shell channels
-
local and remote port forwarding
-
scp + complete sftp version 0-3 implementation
Implementations / adapters for the following algorithms are included:
- ciphers
-
aes{128,192,256}-{cbc,ctr}
,blowfish-cbc
,3des-cbc
- key exchange
-
diffie-hellman-group1-sha1
,diffie-hellman-group14-sha1
- signatures
-
ssh-rsa
,ssh-dss
- mac
-
hmac-md5
,hmac-md5-96
,hmac-sha1
,hmac-sha1-96
,hmac-sha2-256
,hmac-sha2-512
- compression
-
zlib
andzlib@openssh.com
(delayed zlib) - private key files
-
pkcs8
encoded (what openssh uses)
If you need something that is not included, it shouldn’t be too hard to add (do contribute it!)
Java 6+. slf4j is required. bouncycastle is highly recommended and required for using some of the crypto algorithms. jzlib is required for using zlib compression.
Issue tracker: https://github.com/hierynomus/sshj/issues
Google Group: http://groups.google.com/group/sshj-users
- SSHJ 0.12.0 (2015-04-14)
-
-
Added support for HTTP proxies when running JDK6 or JDK7, fixes: #170
-
Merged #186: Fix for detecting end-of-stream
-
Correctly close socket and channel when LocalPortForwarder fails to open and start the channel (Fixes #175 and #176)
-
Merged #181: Invalid write packet length when reading with offset (Fixes #180)
-
- SSHJ 0.11.0 (2015-01-23)
-
-
New maven coordinates
com.hierynomus:sshj:0.11.0
as @hierynomus took over as maintainer of SSHJ -
Migrated build system to Gradle 2.2.1
-
Merged #150: Fix for incorrect file handle on some SSH servers, fixes: #54, #119, #168, #169
-
Made
jzlib
optional in OSGi bundling, fixes: #162 -
Improved some log levels, fixes: #161
-
Merged #156, #164, #165: Fixed block sizes for
hmac-sha2-256
andhmac-sha2-512
-
Merged #141: Add proxy support
-
Upgraded BouncyCastle to 1.51, fixes: #142
-
Implemented keep-alive with connection drop detection, fixes #166
-