Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
3.0.6
-
None
-
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.