- StubUserManager um = new StubUserManager(USERNAME,PASSWORD);
- InputStream is = getClass().getResourceAsStream("/RSA.pk");
- AuthProvider ap = new AuthProvider(um, is);
- Thread sshServerThread = new Thread(NetconfSSHServer.start(10830,tcpAddress,ap));
+ StubUserManager um = new StubUserManager(USERNAME, PASSWORD);
+ String pem;
+ try (InputStream is = getClass().getResourceAsStream("/RSA.pk")) {
+ pem = IOUtils.toString(is);
+ }
+ AuthProvider ap = new AuthProvider(um, pem);
+ Thread sshServerThread = new Thread(NetconfSSHServer.start(10830, tcpAddress, ap));