适用于 Android 的 SSH Java 库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1268942/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 07:38:03  来源:igfitidea点击:

SSH Java-library for Android?

javaandroidsshcommand

提问by Joakim Berglund

I'm trying to create an app for Android that simply sends a command to an SSH server. No response needed, I just need to be able to send a command. I was wondering if there's any java library out there that I could use?

我正在尝试为 Android 创建一个应用程序,它只是向 SSH 服务器发送命令。不需要响应,我只需要能够发送命令。我想知道是否有任何我可以使用的 Java 库?

No advanced stuff needed, just a pure connection to send the command.

不需要高级的东西,只需要一个纯粹的连接来发送命令。

采纳答案by tuergeist

You are searching for JSch.

您正在搜索JSch

Other libs are jaramiko, paramiko, trilead-ssh2. A place where you can browse the source for trilead is the connectbot project. Please notice that connectbot also uses this unmaintained lib.

其他库是jaramikoparamikotrilead-ssh2。您可以浏览 trilead 源代码的地方是connectbot 项目。请注意,connectbot 也使用这个未维护的库。

It also exists a commercial SSH Java lib: J2SSH Maverick

它还存在一个商业 SSH Java 库:J2SSH Maverick

Note: Answer refactored due to comment.

注意:由于评论而重构了答案。