Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
Java 安全通道 (JSCH) 是一个非常流行的库,由 maven、ant 和 eclipse 使用。 它是开源的,具有 BSD 风格许可证。
The Java Secure Channel (JSCH) is a very popular library, used by maven, ant and eclipse. It is open source with a BSD style license.
更新:GSOC 项目和代码不活跃,但这是:
https://github.com/hierynomus/sshj
hierynomus 自 2015 年初起接任维护者。以下是 ,不再维护,Github 链接:
https://github.com/shikhar/sshj
旧版 GSOC 项目:
http://code.google.com/p/commons-net-ssh /
代码质量似乎比 JSch 更好,后者虽然是一个完整且有效的实现,但缺乏文档。 项目页面显示即将发布的测试版,最后一次提交到存储库是在八月中旬。
比较 API:
http://code.google.com/p/commons-net- ssh/
http://www.jcraft.com/jsch/
Update: The GSOC project and the code there isn't active, but this is:
https://github.com/hierynomus/sshj
hierynomus took over as maintainer since early 2015. Here is the older, no longer maintained, Github link:
https://github.com/shikhar/sshj
There was a GSOC project:
http://code.google.com/p/commons-net-ssh/
Code quality seem to be better than JSch, which, while a complete and working implementation, lacks documentation. Project page spots an upcoming beta release, last commit to the repository was mid-august.
Compare the APIs:
http://code.google.com/p/commons-net-ssh/
http://www.jcraft.com/jsch/
我刚刚发现了 sshj,它似乎有比 JSCH 简洁得多的 API(但它需要 Java 6)。 目前,文档主要是存储库中的示例,通常这足以让我去其他地方寻找,但它似乎足以让我在我刚刚开始的项目上尝试一下。
I just discovered sshj, which seems to have a much more concise API than JSCH (but it requires Java 6). The documentation is mostly by examples-in-the-repo at this point, and usually that's enough for me to look elsewhere, but it seems good enough for me to give it a shot on a project I just started.
看一下最近发布的 SSHD,它基于 Apache MINA 项目。
Take a look at the very recently released SSHD, which is based on the Apache MINA project.
github 上有一个全新版本的 Jsch: https://github.com/vngx/vngx-jsch 一些改进包括:全面的 javadoc、增强的性能、改进的异常处理以及更好的 RFC 规范遵守。 如果您希望以任何方式做出贡献,请提出问题或发送拉取请求。
There is a brand new version of Jsch up on github: https://github.com/vngx/vngx-jsch Some of the improvements include: comprehensive javadoc, enhanced performance, improved exception handling, and better RFC spec adherence. If you wish to contribute in any way please open an issue or send a pull request.
我采用了 miku 的答案和 jsch 示例代码。 然后,我必须在会话期间下载多个文件并保留原始时间戳。 这是我的示例代码如何做到这一点,可能很多人都觉得它很有用。 请忽略 filenameHack() 函数,它是我自己的用例。
I took miku's answer and jsch example code. I then had to download multiple files during the session and preserve original timestamps. This is my example code how to do it, probably many people find it usefull. Please ignore filenameHack() function its my own usecase.
http://code.google.com/p/connectbot/,编译 src\com\ trilead\ssh2 在 windows linux 或 android 上,它可以创建本地端口转发器或创建动态端口转发器或其他
http://code.google.com/p/connectbot/, Compile src\com\trilead\ssh2 on windows linux or android , it can create Local Port Forwarder or create Dynamic Port Forwarder or other else