{"id":28021904,"url":"https://github.com/mwiede/jsch","last_synced_at":"2026-01-12T08:06:14.128Z","repository":{"id":38406815,"uuid":"265257800","full_name":"mwiede/jsch","owner":"mwiede","description":"fork of the popular jsch library","archived":false,"fork":false,"pushed_at":"2025-05-05T19:46:36.000Z","size":3219,"stargazers_count":853,"open_issues_count":91,"forks_count":154,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-05-05T20:45:55.858Z","etag":null,"topics":["java","jsch","openssh","ssh","ssh-client"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mwiede.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE.JZlib.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-19T13:40:51.000Z","updated_at":"2025-05-05T19:46:33.000Z","dependencies_parsed_at":"2023-10-24T17:31:09.248Z","dependency_job_id":"c13415dc-59f8-45d1-8835-069f8e6e1b62","html_url":"https://github.com/mwiede/jsch","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Fjsch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Fjsch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Fjsch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiede%2Fjsch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwiede","download_url":"https://codeload.github.com/mwiede/jsch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253480996,"owners_count":21915259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","jsch","openssh","ssh","ssh-client"],"created_at":"2025-05-10T21:02:07.029Z","updated_at":"2026-01-12T08:06:14.077Z","avatar_url":"https://github.com/mwiede.png","language":"Java","readme":"\n                                      JSch\n\n                                Java Secure Channel\n                         by ymnk@jcraft.com, JCraft,Inc.\n\n                            http://www.jcraft.com/jsch/\n\nLast modified: Thu Mar 18 13:58:16 UTC 2015\n\n\nDescription\n===========\nJSch is a pure Java implementation of SSH2.  JSch allows you to \nconnect to an sshd server and use port forwarding, X11 forwarding, \nfile transfer, etc., and you can integrate its functionality\ninto your own Java programs. JSch is licensed under BSD style license.\n\n\nDocumentation\n=============\n* README files all over the source tree have info related to the stuff\n  in the directories. \n* ChangeLog: what changed from the previous version?\n\n\nDirectories \u0026 Files in the Source Tree\n======================================\n* src/com/ has source trees of JSch\n* example/ has some samples, which demonstrate the usages.\n* tools/ has scripts for Ant.\n\n\nWhy JSch?\n==========\nOur intension in developing this stuff is to enable users of our pure\njava X servers, WiredX(http://wiredx.net/) and WeirdX, to enjoy secure X\nsessions.  Our efforts have mostly targeted the SSH2 protocol in relation\nto X Window System and X11 forwarding.  Of course, we are also interested in \nadding other functionality - port forward, file transfer, terminal emulation, etc.\n\n\nFeatures\n========\n* JSch is in pure Java, but it depends on JavaTM Cryptography\n  Extension (JCE).  JSch is know to work with:\n  o J2SE 1.4.0 or later (no additional libraries required).\n  o J2SE 1.3 and Sun's JCE reference implementation that can be\n    obtained at http://java.sun.com/products/jce/\n  o J2SE 1.2.2 and later and Bouncycastle's JCE implementation that\n    can be obtained at http://www.bouncycastle.org/\n* SSH2 protocol support.\n* Key exchange: diffie-hellman-group-exchange-sha1,\n                diffie-hellman-group1-sha1,\n                diffie-hellman-group14-sha1,\n                diffie-hellman-group-exchange-sha256,\n                ecdh-sha2-nistp256,\n                ecdh-sha2-nistp384,\n                ecdh-sha2-nistp521\n* Cipher: blowfish-cbc,3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc\n          3des-ctr,aes128-ctr,aes192-ctr,aes256-ctc,\n          arcfour,arcfour128,arcfour256\n* MAC: hmac-md5,hmac-md5-96,hmac-sha1,hmac-sha1-96\n* Host key type: ssh-dss,ssh-rsa,\n                 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521\n* Userauth: password\n* Userauth: publickey(DSA,RSA,ECDSA)\n* Userauth: keyboard-interactive\n* Userauth: gssapi-with-mic\n* X11 forwarding.\n* xauth spoofing.\n* connection through HTTP proxy.\n* connection through SOCKS5, SOCKS4 proxy.\n* port forwarding.\n* stream forwarding.\n* signal sending.\n  The unofficial patch for sshd of openssh will be find in the thread\n  http://marc.theaimsgroup.com/?l=openssh-unix-dev\u0026m=104295745607575\u0026w=2\n* envrironment variable passing.\n* remote exec.\n* generating DSA and RSA key pairs.\n* supporting private keys in OpenSSL(traditional SSLeay) and PKCS#8 format.\n* SSH File Transfer Protocol(version 0, 1, 2, 3)\n* partial authentication\n* packet compression: zlib, zlib@openssh.com\n  JZlib(http://www.jcraft.com/jzlib/) has been used.\n* hashed known_hosts file.\n* NONE Cipher switching.\n  http://www.psc.edu/networking/projects/hpn-ssh/none.php\n* JSch is licensed under BSD style license(refer to LICENSE.txt).\n\n\nHow To Try\n==========\nThis archive does not include java byte code, so please compile\nthe source code by your self.\n  $ cd jsch-?.?.?/src\n  $ javac com/jcraft/jsch/*java com/jcraft/jsch/jce/*java com/jcraft/jzlib/*.java\n'/examples/' directory has included some samples to demonstrate what \nJSch can do.  Please refer to '/examples/README' file.\n\n\nAES cipher\n==========\nJSch supports aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,\naes256-ctr but you require AES support in your J2SE to choose some of them.  \nIf you are using Sun's J2SE, J2SE 1.4.2 or later is required.  \nAnd then, J2SE 1.4.2(or later) does not support aes256 by the default, \nbecause of 'import control restrictions of some countries'.\nWe have confirmed that by applying\n  \"Java Cryptography Extension (JCE)\n  Unlimited Strength Jurisdiction Policy Files 1.4.2\"\non\n  http://java.sun.com/j2se/1.4.2/download.html#docs\nwe can enjoy 'aes256-cbc,aes256-ctr'.\n\n\nStream Forwarding\n=================\nJSch has a unique functionality, Stream Forwarding.\nStream Forwarding allows you to plug Java I/O streams directly into a remote TCP\nport without assigning and opening a local TCP port.\nIn port forwarding, as with the -L option of ssh command, you have to assign\nand open a local TCP port and that port is also accessible by crackers\non localhost.  In some case, that local TCP port may be plugged to a\nsecret port via SSH session.\nA sample program, /example/StreamForwarding.java , demonstrates\nthis functionality.\n\n\nGenerating Authentication Keys\n==============================\nJSch allows you to generate DSA and RSA key pairs, which are in OpenSSH format.\nPlease refer to 'examples/KeyGen.java'.\n\n\nPacket Compression\n==================\nAccording to the draft from IETF sesch working group, the packet\ncompression can be applied to each data stream directions; from sshd\nserver to ssh client and from ssh client to sshd server.  So, jsch\nallows you to choose which data stream direction will be compressed or not.\nFor example, in X11 forwarding session, the packet compression for data\nstream from sshd to ssh client will save the network traffic, but\nusually the traffic from ssh client to sshd is light, so by omitting\nthe compression for this direction, you may be able to save some CPU time.\nPlease refer to a sample program 'examples/Compression.java'.\n\n\nProperty\n========\nBy setting properties, you can control the behavior of jsch.\nHere is an example of enabling the packet compression,\n\n      Session session=jsch.getSession(user, host, 22);\n      java.util.Properties config=new java.util.Properties();\n      config.put(\"compression.s2c\", \"zlib,none\");\n      config.put(\"compression.c2s\", \"zlib,none\");\n      session.setConfig(config);\n      session.connect();\n\nCurrent release has supported following properties,\n* compression.s2c: zlib, none\n  default: none\n  Specifies whether to use compression for the data stream\n  from sshd to jsch.  If \"zlib,none\" is given and the remote sshd does\n  not allow the packet compression, compression will not be done.\n* compression.c2s: zlib, none\n  default: none\n  Specifies whether to use compression for the data stream\n  from jsch to sshd.\n* StrictHostKeyChecking: ask | yes | no\n  default: ask\n  If this property is set to ``yes'', jsch will never automatically add\n  host keys to the $HOME/.ssh/known_hosts file, and refuses to connect\n  to hosts whose host key has changed.  This property forces the user\n  to manually add all new hosts.  If this property is set to ``no'', \n  jsch will automatically add new host keys to the user known hosts\n  files.  If this property is set to ``ask'', new  host keys will be\n  added to the user known host files only after the user has confirmed \n  that is what they really want to do, and jsch will refuse to connect \n  to hosts whose host key has changed.\n\n\nTODO\n====\n* re-implementation with java.nio.\n* replacing cipher, hash by JCE with pure Java code.\n* SSH File Transfer Protocol version 4.\n* error handling.\n\n\nCopyrights \u0026 Disclaimers\n========================\nJSch is copyrighted by ymnk, JCraft,Inc. and is licensed through BSD style license.\nRead the LICENSE.txt file for the complete license.\n\n\nCredits and Acknowledgments\n============================\nJSch has been developed by ymnk@jcraft.com and it can not be hacked\nwithout several help.\n* First of all, we want to thank JCE team at Sun Microsystems.\n  For long time, we had planed to implement SSH2 in pure Java,\n  but we had hesitated to do because tons of work must be done for\n  implementing ciphers, hashes, etc., from the scratch.\n  Thanks to newly added functionalities to J2SE 1.4.0, we could\n  start this project.\n* We appreciate the OpenSSH project.\n  The options '-ddd' of sshd, '---vvv' of ssh and the compile options \n  '-DPACKET_DEBUG', '-DDEBUG_KEXDH' and  '-DDEBUG_KEX' were very\n  useful in debugging JSch.\n* We appreciate IETF sesch working group and SSH Communications Security Corp.\n  Without the standardization of the protocol, we could not get the\n  chance to implement JSch.\n* We appreciate Seigo Haruyama(http://www.unixuser.org/~haruyama/),\n  who are interpreting drafts of SSH2 protocol in Japanese.\n  His works were very useful for us to understand the technical terms\n  in our native language.\n* We also appreciate SourceForge.net's awesome service to the \n  Open Source Community.\n\n\nIf you have any comments, suggestions and questions, write us \nat jsch@jcraft.com\n\n\n``SSH is a registered trademark and Secure Shell is a trademark of\nSSH Communications Security Corp (www.ssh.com)''.\n","funding_links":[],"categories":["Java","网络编程"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwiede%2Fjsch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwiede%2Fjsch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwiede%2Fjsch/lists"}