@Before public void setUp() throws IOException { fixture.getServer().setForwardingFilter(new AcceptAllForwardingFilter()); File file = httpServer.getDocRoot().newFile("index.html"); FileUtil.writeToFile(file, "<html><head/><body><h1>Hi!</h1></body></html>"); }
server.setUserAuthFactories(authFactoriesFactory.getFactories()); server.setAgentFactory(KarafAgentFactory.getInstance()); server.setForwardingFilter(AcceptAllForwardingFilter.INSTANCE); server.getProperties().put(SshServer.IDLE_TIMEOUT, Long.toString(sshIdleTimeout)); server.getProperties().put(SshServer.NIO_WORKERS, Integer.toString(nioWorkers));
server.setUserAuthFactories(authFactoriesFactory.getFactories()); server.setAgentFactory(KarafAgentFactory.getInstance()); server.setForwardingFilter(AcceptAllForwardingFilter.INSTANCE); server.getProperties().put(SshServer.IDLE_TIMEOUT, Long.toString(sshIdleTimeout)); server.getProperties().put(SshServer.NIO_WORKERS, Integer.toString(nioWorkers));
sshd.setHost(InetAddress.getLoopbackAddress().getCanonicalHostName()); sshd.setPort(0); sshd.setForwardingFilter(AcceptAllForwardingFilter.INSTANCE); sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider()); sshd.setPublickeyAuthenticator(new KeySetPublickeyAuthenticator(authorizedKeys));