.

Shikhar Bhushan
2010-08-12 14:46:43 -07:00
parent 6a64166180
commit ce5a62366f
5 changed files with 140 additions and 57 deletions

26
Changelog.md Normal file

@@ -0,0 +1,26 @@
version 0.3.0-SNAPSHOT
-----------------------
+ `channel.close()` method no longer called implicitly on disconnecting, because this is error prone. See updated examples.
+ Logging fix: enable filtering, previously due to misconfiguration this was hard to do.
+ Don't barf when a server sends more `CHANNEL_DATA` than announced. Now there is no exception in this case, but still only as much data as announced is consumed.
+ Client was still identifying as `SSHJ_0_1` -- changed to `SSHJ_0_3`.
+ Support for SFTP versions less than 3.
+ Host based authentication - see `net.schmizz.sshj.userauth.method.AuthHostbased` - pass an instance to `SSHClient.auth()` to use.
+ Various code cleanups.
version 0.2.3
--------------
+ In 0.2.0 `DefaultModeGetter` along with setting permissions also started throwing an exception if it could not, and this was problematic on windows so the exception has been replaced with a log message.
version 0.2.0
--------------
+ Now compiled with compiler source and target level = 6 -- JRE 6+ is required! Always was, just more explicit now.
+ New methods in `SFTPClient`: checking if a file/directory exists (`statExistence()` -- returns `null` on file not found); recursively create directories (`mkdirs()`).
+ Bug with SFTP directory listing being truncated fixed.
+ Timestamps and permissions are now preserved by default when transferring with SCP or SFTP. A bug which prevented even using the `ModeGetter` or `ModeSetter` interface for this purpose has been quashed.
+ `keyboard-interactive` authentication now supported. `SSHClient#authPassword()` attempts to use it as a fallback by default.
+ An interface has been introduced for observing progress of file transfers (`TransferListener`) which can be registered with any `FileTransfer` implementation (i.e. `SCPFileTransfer`; `SFTPFileTransfer`).
+ Various bugfixes and improvements.

@@ -1,22 +0,0 @@
h3. version 0.3.0-SNAPSHOT (draft)
* <code>channel.close()</code> method no longer called implicitly on disconnecting, because this is error prone. See updated examples.
* Logging fix: enable filtering, previously due to misconfiguration this was hard to do.
* Don't barf when a server sends more <code>CHANNEL_DATA</code> than announced. Now there is no exception in this case, but still only as much data as announced is consumed.
* Client was still identifying as <code>SSHJ_0_1</code> -- changed to <code>SSHJ_0_3</code>.
* Support for SFTP versions less than 3.
* Host based authentication - see <code>net.schmizz.sshj.userauth.method.AuthHostbased</code> - pass an instance to <code>SSHClient.auth</code> to use.
h3. version 0.2.3
* In 0.2.0 <code>DefaultModeGetter</code> along with setting permissions also started throwing an exception if it could not, and this was problematic on windows so the exception has been replaced with a log message.
h3. version 0.2.0
* Now compiled with compiler source and target level = 6 -- JRE 6+ is required! Always was, just more explicit now.
* New methods in <code>SFTPClient</code>: checking if a file/directory exists (<code>statExistence()</code> -- returns <code>null</code> on file not found); recursively create directories (<code>mkdirs()</code>).
* Bug with SFTP directory listing being truncated fixed.
* Timestamps and permissions are now preserved by default when transferring with SCP or SFTP. A bug which prevented even using the <code>ModeGetter</code> or <code>ModeSetter</code> interface for this purpose has been quashed.
* <code>keyboard-interactive</code> authentication now supported. <code>SSHClient#authPassword()</code> attempts to use it as a fallback by default.
* An interface has been introduced for observing progress of file transfers (<code>TransferListener</code>) which can be registered with any <code>FileTransfer</code> implementation (i.e. <code>SCPFileTransfer</code>; <code>SFTPFileTransfer</code>).
* Various bugfixes and improvements.

35
Home.md

@@ -1 +1,34 @@
[[Maven Artifact]]
[[Maven]]
[[Changelog]]
Frequently Asked Questions
===========================
+ **Toning down the logging**
sshj uses sl4j, which is just a facade, so it depends on how the underlying logging implementation you are using is configured. For example, in case of log4j this is typically accomplished with a `log4j.properties` in the classpath. Filter out/down messages from the `net.schmizz` category.
*In versions less than 0.3.0 there is an embarrassing bug that some logger categories are misconfigured. So filtering will not work correctly.*
+ **Android support**
Android is not supported because sshj uses elements of the Java 6 library, which is not fully supported in the Android SDK. So when that happens, sshj will work on Android.
+ **I/O with Channels**
```java
// on any Channel, including Session.Command, Session.Shell and Session.Subsystem
getOutputStream() // -> java.io.OutputStream; corresponds to stdin
getInputStream() // -> java.io.InputStream; corresponds to stdout
// only on Session.Command and Session.Shell
getErrorStream() // -> java.io.InputStream; corresponds to stderr
// only on Session.Command
getOutputAsString() // -> java.lang.String; this is blocking since it reads all the data from stdout until it encounters EOF
```
+ **Concurrency**
Multiplexing channels over a single connection is supported.

@@ -1,34 +0,0 @@
h2. Releases
sshj releases are present in the central maven repository.
<pre>
<dependency>
<groupId>net.schmizz</groupId>
<artifactId>sshj</artifactId>
<version>0.2.3</version>
</dependency>
</pre>
h2. Snapshots
You will need to add the sonatype remote repository if you don't have it already.
<pre>
<repositories>
<repository>
<id>sonatype</id>
<url>http://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
</pre>
And a dependency like this:
<pre>
<dependency>
<groupId>net.schmizz</groupId>
<artifactId>sshj</artifactId>
<version>0.3.0-SNAPSHOT</version>
</dependency>
</pre>

80
Maven.md Normal file

@@ -0,0 +1,80 @@
Releases
=========
sshj releases are present in the central maven repository:
```xml
<dependency>
<groupId>net.schmizz</groupId>
<artifactId>sshj</artifactId>
<version>0.2.3</version>
</dependency>
```
Snapshots
==========
You will need to add the sonatype remote repository if you don't have it:
```xml
<repositories>
<repository>
<id>sonatype</id>
<url>http://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
```
And a dependency on a sshj snapshot:
```xml
<dependency>
<groupId>net.schmizz</groupId>
<artifactId>sshj</artifactId>
<version>0.3.0-SNAPSHOT</version>
</dependency>
```
Additional dependencies
========================
Required
---------
`slf4j-api` will get pulled in transitively, but you need to add a slf4j binding and the implementation for that binding. If you don't have strong preferences for some logging framework, try [[logback|http://logback.qos.ch]] which natively implements the slf4j api.
```xml
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>0.9.24</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.24</version>
</dependency>
```
Optional
---------
Throw in BouncyCastle to be able to read in openssh key files and generally get better crypto.
```xml
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.45</version>
</dependency>
```
jzlib if you intend to use zlib compression.
```xml
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jzlib</artifactId>
<version>1.0.7</version>
</dependency>
```