使用SSH的Apache Felix shell

我对如何使用Apache Felix和SSH感兴趣? 我想使用SSH从远程计算机访问Felix shell。 我知道有一个telnet支持,但它太不安全了。 有什么解决方案吗?

是的,有一个,如这里所描述的(指南是相对于eclipse的昼夜平分点但无关紧要)使用gogo shell , apache mina sshd服务器和三个equinox控制台捆绑 (ssh的核心+ ssh插件+ jaas插件)的组合身份validation)您将能够连接到mina的ssh服务器,并且您的与OSGi相关的命令将由gogo shell执行。

你需要这些包:

  • GoGo Shell :org.apache.felix.gogo.command.jar,org.apache.felix.gogo.runtime.jar,org.apache.felix.gogo.shell.jar
  • Equinox控制台捆绑包 :org.eclipse.equinox.console.jar,org.eclipse.equinox.console.supportability.jar,org.eclipse.equinox.console.jaas.fragment.jar
  • Apache Mina :org.apache.mina.core.jar,org.apache.sshd.core.jar
  • 并且用于记录slf4j-api.jar和slf4j-api_impl.jar

如此处所述,您还需要在Felix配置文件中使用以下属性:

osgi.console.enable.builtin=false osgi.console.ssh= osgi.console.ssh.useDefaultSecureStorage=true 

equinox JAAS包将搜索org.eclipse.equinox.console.authentication.config文件,该文件将启用登录模块:

 equinox_console { org.eclipse.equinox.console.jaas.SecureStorageLoginModule REQUIRED; }; 

我不太确定在哪里使用Felix进行搜索(我不确定这是以标准的OSGi方式完成的),但conf目录是一个很好的猜测。

用户equinox / equinox已经存在,可以使用提供的控制台命令创建其他用户。

编辑:对于equinox控制台/可支持性软件包,您可以从此处获取Mars版本,扩展Add-on Bundles部分

org.eclipse.equinox.console_1.1.100.v20141023-1406.jar

您还需要可 从此处获得的可支持性捆绑包 (最新版本来自2011)。