Details
Description
The bin/client tries to read etc/org.apache.karaf.shell.cfg file to automatically get the SSH port number:
Properties shellCfg = loadProps(new File(System.getProperty("karaf.etc"), "org.apache.karaf.shell.cfg")); String host = shellCfg.getProperty("sshHost", "localhost"); int port = Integer.parseInt(shellCfg.getProperty("sshPort", "8101"));
Unfortunately, if etc/org.apache.karaf.shell.cfg file is not present or not readable, the client fails to start. We should add a try/catch statement and fallback to the default 8101 port number.