【问题标题】:Accessing remote Fuse/Karaf console using SSH使用 SSH 访问远程 Fuse/Karaf 控制台
【发布时间】:2014-01-19 09:44:14
【问题描述】:

我有一个在 RHEL 机器中运行的 Fuse ESB 独立服务器。我想远程连接到 Karaf 控制台来管理捆绑包。

如果我关闭当前会话,我如何再次回到我的 karaf 控制台? 我将我的 Fuse ESB 配置为 8101 端口用于 SSH。我可以通过我的 SSH 客户端(腻子)直接连接它吗 或者我是否需要另一个本地熔断器 esb 实例来访问远程熔断器实例? 无论哪种方式我都无法连接,它说访问被拒绝。还有其他更简单的方法可以连接到远程 fuse/karaf 实例吗?

即使我尝试使用 bin 目录中的 Client.sh,它也会显示身份验证失败。但我创建了一个具有管理员角色的 JAAS 用户。

顺便说一句,仅仅一个用户就足以做到这一点吗?还是还需要公钥/私钥配置?

管理远程 Fuse/Karaf 实例的常用方法是什么?

【问题讨论】:

    标签: apache-karaf jaas fuseesb apache-servicemix


    【解决方案1】:

    您可以在 JBoss Fuse 文档(例如 Fuse ESB 的后续版本)中找到许多详细信息,网址为

    这里有一章是关于远程连接到容器的

    您需要为容器上有效且具有管理员角色的用户传递凭据。

    karaf shell 还有一个 jaas 命令,它允许您列出用户及其角色等。以及添加新用户等。您还可以从 Fuse 的 FMC Web 控制台进行一些用户管理ESB。

    【讨论】:

    • 我实际上尝试了文档中提到的三种方法。我创建了一个具有管理员角色的用户,启用了 SSH 端口(8101)。当我执行 `ssh -p 8101 jaasuser@hostname' 时,它说访问被拒绝。
    【解决方案2】:

    您可能还想检查您的 IPtables http://ask.xmodulo.com/open-port-firewall-centos-rhel.html

     - $ sudo iptables -I INPUT -p tcp -m tcp --dport 8101 -j ACCEPT
     - $ sudo service iptables save
     - $ service iptables restart
    

    您可以从另一个 karaf 实例运行此命令

    JBossFuse:karaf@root> ssh -l username -P password -p port hostname
    

    例如

     - JBossFuse:karaf@root> ssh -l smx-P smx -p 8101 10.234.12.12
    

    【讨论】:

    • 酷德国人!谢谢你。
    【解决方案3】:

    您必须确保在 etc/org.apache.karaf.shell.cfg 中定义的 ssh 角色名称

    # shRole defines the role required to access the console through ssh
    #
    sshRole = ssh
    

    匹配 etc/user.properties 中的那个

    #
    # This file contains the users, groups, and roles.
    # Each line has to be of the format:
    #
    # USER=PASSWORD,ROLE1,ROLE2,...
    # USER=PASSWORD,_g_:GROUP,...
    # _g_\:GROUP=ROLE1,ROLE2,...
    #
    # All users, grousp, and roles entered in this file are available after Karaf startup
    # and modifiable via the JAAS command group. These users reside in a JAAS domain
    # with the name "karaf".
    #
    karaf = karaf,_g_:admingroup
    _g_\:admingroup = group,admin,manager,viewer,ssh
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-22
      • 1970-01-01
      • 2015-06-25
      相关资源
      最近更新 更多