JSch is an open source and pure Java implementation of SSH2.
The JSch project provides users a way to connect to a sshd server and use port forwarding, file transfer, X11 forwarding, etc.
Here are some key features of "JSch":
· X11 forwarding
· xauth spoofing
· port forwarding
· stream forwarding
· signal sending
· envrironment variable passing
· remote exec
· generating DSA and RSA key pairs
· changing the passphrase for a private key
· partial authentication
· SSH File Transfer Protocol
What's New in This Release: [ read full changelog ]
· bugfix: "verify: false" error on Java7u6(and later). FIXED. http://stackoverflow.com/questions/12279836/ssh-using-jschexception-verify-false-sometimes-fails https://issues.apache.org/jira/browse/IVY-1374
· bugfix: Session#setPortForwardingL(String bind_address, int lport, String host, int rport) will not work for the long host name. FIXED.
· change: changed JSch#getIdentityRepository() to be public.
· feature: added the following method to choose a canceled remote port-forwarding with the specified bind address, Session#delPortForwardingR(String bind_address, int rport)
· feature: added support for following OpenSSH's sftp extensions, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, and some methods and a class to use those functionalities, ChannelSftp#hardlink(String oldpath, String newpath), ChannelSftp#statVFS(String path) SftpStatVFS
· feature: added support for OpenSSH's configuration file, JSch#setConfigRepository(ConfigRepository configRepository) JSch#getConfigRepository() OpenSSHConfig class Session#getSession(String host) and added an example to demonstrate how to use it, examples/OpenSSHConfig.java OpenSSHConfig class will recognize the following keywords, Host User Hostname Port PreferredAuthentications IdentityFile NumberOfPasswordPrompts ConnectTimeout HostKeyAlias UserKnownHostsFile KexAlgorithms HostKeyAlgorithms Ciphers Macs Compression CompressionLevel ForwardAgent RequestTTY ServerAliveInterval LocalForward RemoteForward ClearAllForwardings
· feature: added support for "diffie-hellman-group-exchange-sha256"
· feature: allowed to use tilde(~) in the file name, JSch#setIdentity(String prvkey, String pubkey) JSch#setKnownHosts(String prvkey, String pubkey)
· feature: added support for known_hosts file, which may include markers(@revoke) and comments. HostKey(String host, int type, byte key, String comment) HostKey(String marker, String host, int type, byte key, String comment) HostKey#getComment() HostKey#getMarker()
· feature: added following methods to KeyPar class, writePrivateKey(java.io.OutputStream out, byte passphrase) writePrivateKey(String name, byte passphrase)
· feature: allowed to set the connection timeout for the local port-forwarding, and added following methods, Session#setPortForwardingL(String bind_address, int lport, String host, int rport, ServerSocketFactory ssf, int connectTimeout) ChannelDirectTCPIP#connect(int connectTimeout)
· feature: added the following method to Session class getStreamForwarder(String host, int port) and updated example/StreamForwarding.java to use that method.
· feature: added following methods to Session class, setPortForwardingL(String conf) setPortForwardingR(String conf)
· feature: allowed to have the session local HostkeyRepository, Session#setHostKeyRepository(HostKeyRepository hostkeyRepository) Session#getHostKeyRepository()
· feature: added support for OpenSSH's local extension, "email@example.com" and the method, Session#noMoreSessionChannels()