Configuring remote instances
The SSH hostname and port number of the remote console is configured in the <RuntimeContainerPath>/etc/org.apache.karaf.shell.cfg configuration file with the following defaults values:
sshPort=8101
sshHost=0.0.0.0
sshRealm=karaf
hostKey=${karaf.base}/etc/host.key
You can change this configuration using the config commands or by editing the above file, but you will need to restart the ssh console in order for it to use the new parameters.
# define helper functions
bundle-by-sn = { bm = new java.util.HashMap ; //
each (bundles) { $bm put ($it symbolicName) $it } ; $bm get $1 }
bundle-id-by-sn = { b = (bundle-by-sn $1) ; //
if { $b } { $b bundleId } { -1 } }
# edit config
config:edit org.apache.karaf.shell
config:property-set sshPort 8102
config:update
# force a restart
bundle:restart --force (bundle-id-by-sn org.apache.karaf.shell.ssh)