SshServer sshd1 = SshServer.setUpDefaultServer();
sshd1.setPort(port1);
sshd1.setKeyPairProvider(Utils.createTestHostKeyProvider());
sshd1.setShellFactory(shellFactory);
sshd1.setPasswordAuthenticator(new BogusPasswordAuthenticator());
sshd1.setPublickeyAuthenticator(new BogusPublickeyAuthenticator());
sshd1.setAgentFactory(agentFactory);
sshd1.start();
SshServer sshd2 = SshServer.setUpDefaultServer();
sshd2.setPort(port2);
sshd2.setKeyPairProvider(Utils.createTestHostKeyProvider());
sshd2.setShellFactory(new TestEchoShellFactory());
sshd2.setPasswordAuthenticator(new BogusPasswordAuthenticator());
sshd2.setPublickeyAuthenticator(new BogusPublickeyAuthenticator());
sshd2.setAgentFactory(new ProxyAgentFactory());
sshd2.start();
SshClient client1 = SshClient.setUpDefaultClient();