Remove the replacement of File separators in key path,
windows can handle linux style paths, added a warning to config to use linux style paths.
Change-Id: I01d07fa65cd11dcc321cbf4d6f5aac0792922309
Signed-off-by: Tomas Cere <tcere@cisco.com>
netconf.ssh.address=0.0.0.0
netconf.ssh.port=1830
netconf.ssh.address=0.0.0.0
netconf.ssh.port=1830
netconf.ssh.pk.path = ./configuration/RSA.pk
# Set security provider to BouncyCastle
org.apache.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider
netconf.ssh.pk.path = ./configuration/RSA.pk
# Set security provider to BouncyCastle
org.apache.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netconf-impl</artifactId>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netconf-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
-import org.apache.commons.io.FilenameUtils;
import org.apache.sshd.common.util.ThreadUtils;
import org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider;
import org.opendaylight.controller.netconf.ssh.SshProxyServer;
import org.apache.sshd.common.util.ThreadUtils;
import org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider;
import org.opendaylight.controller.netconf.ssh.SshProxyServer;
private SshProxyServer startSSHServer(final BundleContext bundleContext) throws IOException {
final Optional<InetSocketAddress> maybeSshSocketAddress = NetconfConfigUtil.extractNetconfServerAddress(bundleContext, InfixProp.ssh);
private SshProxyServer startSSHServer(final BundleContext bundleContext) throws IOException {
final Optional<InetSocketAddress> maybeSshSocketAddress = NetconfConfigUtil.extractNetconfServerAddress(bundleContext, InfixProp.ssh);
- if (maybeSshSocketAddress.isPresent() == false) {
+ if (!maybeSshSocketAddress.isPresent()) {
LOG.trace("SSH bridge not configured");
return null;
}
LOG.trace("SSH bridge not configured");
return null;
}
authProviderTracker = new AuthProviderTracker(bundleContext);
authProviderTracker = new AuthProviderTracker(bundleContext);
- final String path = FilenameUtils.separatorsToSystem(NetconfConfigUtil.getPrivateKeyPath(bundleContext));
+ final String path = NetconfConfigUtil.getPrivateKeyPath(bundleContext);
+
checkState(!Strings.isNullOrEmpty(path), "Path to ssh private key is blank. Reconfigure %s",
NetconfConfigUtil.getPrivateKeyKey());
checkState(!Strings.isNullOrEmpty(path), "Path to ssh private key is blank. Reconfigure %s",
NetconfConfigUtil.getPrivateKeyKey());