Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-5301

system properties and client config conflict

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 3.0.6
    • None
    • karaf
    • None

    Description

      If you want to open the ssh port for all the IP addresses of the machine, you must put 0.0.0.0 in the sshHost variable.
      In this case it is impossible to connect with the client, which also uses 0.0.0.0:

      bin/client
      ...
      org.apache.sshd.common.util.SecurityUtils - BouncyCastle not registered, using the default JCE provider
      DEBUG org.apache.sshd.common.io.nio2.Nio2Connector - Connecting to 0.0.0.0:8101
      

      if you put localhost in the sshHost variable. the ssh port is only open for localhost.

      You can not open a remote connection but only from localhost.

      If you put any DNS name, our IP of the machine you can not open connection using client (except using command line parameters).

      I suggest adding a default substitution in the case of 0.0.0.0 in org.apache.karaf.client.ClientConfig:49:

      if ("0.0.0.0".equals(this.host)) {
        this.host = "localhost" 
      }
      

      like this you can open the ssh port to any addresses of the machine and simply use bin/client to connect.

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            sekaijin Terrien Jean-Yves
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: