Documentation
Open Source Release Policy
Export Compliance
Using BouncyCastle
Installing the API
Enabling Logging
Per-Connection Logging
Third Party Dependencies
Generating SSH Keys
Using BouncyCastle
Using SSH Public Keys in Java
Supporting ED25519/Curve25519
Supporting Compression
Integrating Licensing into Maven Builds
Creating an SSH Client
Public Key Authentication
Keyboard Interactive Authentication
Public Key Authentication with sshagent
Executing Single Commands
Executing Commands within a Shell
Transferring Files
Connecting through Proxies
Display the Authentication Banner
Using the SFTP Client
Port Forwarding
Working Examples
Configuring Listening Interfaces
Configuring Host Keys
Password Authentication
Public Key Authentication
Challenge-Response Authentication
Configuring Port Forwarding
Configuring SFTP
Supporting SCP
Implementing your own File System
Creating an Interactive Terminal
Proxy Protocol Support
Introduction
As a Maverick Synergy Hotfixes or Maverick Legacy customer, you should always ensure that your most recent license is added to your source code to ensure you have access to the latest API updates.
Maverick licenses are valid only for releases within your maintenance period. You will see the error below if you attempt to use a version of the product released outside your maintenance window.
com.maverick.ssh.SshException: Your subscription has expired! visit http://www.sshtools.com to purchase a subscription
at com.maverick.ssh.SshConnector.createInstance(SshConnector.java:317)
at com.maverick.ssh.SshConnector.createInstance(SshConnector.java:272)
at com.maverick.ssh.SshConnector.createInstance(SshConnector.java:260)
at com.maverick.ssh.SshConnector.createInstance(SshConnector.java:241)
at PasswordConnect.main(PasswordConnect.java:80)
Code language: JavaScript (javascript)
The ideal time to update the license in your source code is when you receive our email with your new license key. If you do this on each renewal, regardless of whether you update the library version, it will ensure you never see a license error during development.
However, with the introduction of monthly subscriptions to our Hotfixes API, this has become more problematic due to the restricted maintenance window of a monthly license. We, therefore, have created a service that allows you to integrate licensing into your Maven build process to ensure you always have the latest license built into your code with absolutely no effort (other than making the changes to your build process to support it).
Setting up your Account
The first step is to upload a public key to your account. The public key will be used to authenticate access to our licensing server. This is just a standard SSH public/private key and can be generated with the ssh-keygen utility. We recommend generating a modern key type like ssh-ed25519.
ssh-keygen -t ssh-ed25519
You should encrypt the key with a passphrase.
Then log in to your account on our CRM at https://store.jadaptive.com and upload the key to your Authorized Keys list. This is accessed via the Home menu.

Upload the .pub file and provide a suitable name, for example, “Build Key”.

Whilst you’re logged in to your account, visit the Accounts page.

Find your account and make a note of the username that has been allocated to your account. It’s the underlined link in the first column.

Configuring Maven POM
You’re ready to configure your build and add our download plugin to your Maven POM. Add the following <plugin> entry to your <plugins> section under <build>
<build>
<plugins>
<plugin>
<groupId>com.sshtools</groupId>
<artifactId>jadaptive-license-helper</artifactId>
<version>0.0.1</version>
<executions>
<execution>
<goals>
<goal>download-license</goal>
</goals>
</execution>
</executions>
<configuration>
<username>lee_painter123</username>
<companyName>Jadaptive Limited</companyName>
<emailAddress>lee@jadaptive.com</emailAddress>
<privateKey>-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACC6PZ5ixStWsnQIfSZ31Kes0M5FCRSRbH8KTS4gaLEMgAAAKAokRb8KJEW
/AAAAAtzc2gtZWQyNTUxOQAAACC6P5ixStWsnQIfSZc31Kes0M5FCRSRbH8KTS4gaLEMg
AAAEAFGZfrOfOXe9XzOmRd9W32on7cs6MdY2MFyPhuZ3/jro9nmLFK1aydAh9JlzfUp6z
QzkUJFJFsfwpNLiBosQyAAAAF2xlZUMZWVzLWlNYWMtUHJvLmxvY2FsAQIDBAUG
-----END OPENSSH PRIVATE KEY-----</privateKey>
<passphrase>likeIwouldtellyouthat</passphrase>
<productCode>SYNERGY</productCode>
</configuration>
</plugin>
</plugins>
</build>
Code language: HTML, XML (xml)
Set the <configuration> properties according to the values you collected earlier. The product code must be the correct code for the license you are downloading. Choose from the list below based on the API you use.
Maverick Synergy | SYNERGY |
Maverick Legacy Client | MALC |
Maverick Legacy Server | SSHD |
Run the Build
Assuming you set that up correctly, your license will be embedded into your final jar file in a suitable location for the API to find it. Every time you build your solution, you will have the most recent license on your account.
If you have chosen one of our Monthly Hotfix subscriptions, this will be an invaluable time saver, ensuring your product has the most recent license for using our APIs in each release.