Skip to content
A git repository including all jsch releases. http://www.jcraft.com/jsch/
Java Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
src/com/jcraft/jsch
tools/bin
ChangeLog
LICENSE.txt
README
build.bat
build.sh
build.xml

README

                                      JSch

                                Java Secure Channel
                         by ymnk@jcraft.com, JCraft,Inc.

                            http://www.jcraft.com/jsch/

Last modified: Tue Feb 11 14:11:51 UTC 2003


Description
===========
JSch is a pure Java implementation of SSH2.  JSch allows you to 
connect to an sshd server and use port forwarding, X11 forwarding, 
file transfer, etc., and you can integrate its functionality
into your own Java programs. JSch is licensed under BSD style license.


Documentation
=============
* README files all over the source tree have info related to the stuff
  in the directories. 
* ChangeLog: what changed from the previous version?


Directories & Files in the Source Tree
======================================
* src/com/ has source trees of JSch
* example/ has some samples, which demonstrate the usages.
* tools/ has scripts for Ant.


Why JSch?
==========
Our intension in developing this stuff is to enable users of our pure
java X servers, WiredX(http://wiredx.net/) and WeirdX, to enjoy secure X
sessions.  Our efforts have mostly targeted the SSH2 protocol in relation
to X Window System and X11 forwarding.  Of course, we are also interested in 
adding other functionality - port forward, file transfer, terminal emulation, etc.


Features
========
* JSch requires J2SE 1.4.
  JSch is in pure Java, but it depends on JavaTM Cryptography
  Extension (JCE), which is included in J2SE 1.4.0 or later.
* SSH2 protocol support.
* Key exchange: diffie-hellman-group-exchange-sha1, diffie-hellman-group1-sha1
* Cipher: blowfish-cbc,3des-cbc
* MAC: hmac-md5,hmac-md5-96,hmac-sha1,hmac-sha1-96
* Host key type: ssh-dss, ssh-rsa
* Userauth: password
* Userauth: publickey(DSA,RSA)
* X11 forwarding.
* xauth spoofing.
* connection through HTTP proxy.
* connection through SOCKS5 proxy.
* port forwarding.
* stream forwarding.
* signal sending.
  The unofficial patch for sshd of openssh will be find in the thread
  http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=104295745607575&w=2
* remote exec.
* SSH File Transfer Protocol
* packet compression.
  JZlib(http://www.jcraft.com/jzlib/) has been used.
* JSch is licensed under BSD style license(refer to LICENSE.txt).


How To Try
==========
This archive does not include java byte code, so please compile
the source code by your self.
  $ cd jsch-?.?.?/src
  $ javac com/jcraft/jsch/*java com/jcraft/jsch/jce/*java com/jcraft/jzlib/*.java
'/examples/' directory has included some samples to demonstrate what 
JSch can do.  Please refer to '/examples/README' file.


Stream Forwarding
=================
JSch has a unique functionality, Stream Forwarding.
Stream Forwarding allows you to plug Java I/O streams directly into a remote TCP
port without assigning and opening a local TCP port.
In port forwarding, as with the -L option of ssh command, you have to assign
and open a local TCP port and that port is also accessible by crackers
on localhost.  In some case, that local TCP port may be plugged to a
secret port via SSH session.
A sample program, /example/StreamForwarding.java , demonstrates
this functionality.


Packet Compression
==================
According to the draft from IETF sesch working group, the packet
compression can be applied to each data stream directions; from sshd
server to ssh client and from ssh client to sshd server.  So, jsch
allows you to choose which data stream direction will be compressed or not.
For example, in X11 forwarding session, the packet compression for data
stream from sshd to ssh client will save the network traffic, but
usually the traffic from ssh client to sshd is light, so by omitting
the compression for this direction, you may be able to save some CPU time.
Please refer to a sample program 'examples/Compression.java'.


TODO
====
* generating RSA, DSA key pairs.
* filename globbing on sftp session.
* re-implementation with java.nio.
* replacing cipher, hash by JCE with pure Java code.
* error handling.


Copyrights & Disclaimers
========================
JSch is copyrighted by ymnk, JCraft,Inc. and is licensed through BSD style license.
Read the LICENSE.txt file for the complete license.


Credits and Acknowledgments
============================
JSch has been developed by ymnk@jcaft.com and it can not be hacked
without several help.
* First of all, we want to thank JCE team</a> at Sun Microsystems.
  For long time, we had planed to implement SSH2 in pure Java,
  but we had hesitated to do because tons of work must be done for
  implementing ciphers, hashes, etc., from the scratch.
  Thanks to newly added functionalities to J2SE 1.4.0, we could
  release the first working version within just 1.5 weeks from the scratch.
* We appreciate the OpenSSH project.
  The options '-ddd' of sshd, '---vvv' of ssh and the compile options 
  '-DPACKET_DEBUG', '-DDEBUG_KEXDH' and  '-DDEBUG_KEX' were very
  useful in debugging JSch.
* We appreciate IETF sesch working group and SSH Communications Security Corp.
  Without the standardization of the protocol, we could not get the
  chance to implement JSch.
* We appreciate Seigo Haruyama(http://www.unixuser.org/~haruyama/),
  who are interpreting drafts of SSH2 protocol in Japanese.
  His works were very useful for us to understand the technical terms
  in our native language.
* We also appreciate SourceForge.net's awesome service to the 
  Open Source Community.

If you have any comments, suggestions and questions, write us 
at jsch@jcraft.com


``SSH is a registered trademark and Secure Shell is a trademark of
SSH Communications Security Corp (www.ssh.com)''.
Something went wrong with that request. Please try again.