if (isSSHServerEnabled) {
SshServer sshd = SshServer.setUpDefaultServer();
sshd.setPort(ERXProperties.intForKeyWithDefault("er.wotaskd.sshd.port", 6022));
sshd.setPasswordAuthenticator(new SshPasswordAuthenticator());
sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("hostkey.ser"));
sshd.setCommandFactory(new ScpCommandFactory());
sshd.setSubsystemFactories(Arrays.<NamedFactory<Command>>asList(new SftpSubsystem.Factory()));
sshd.setShellFactory(new ProcessShellFactory(new String[] { "/bin/bash", "-i", "-l" }));
try {
sshd.start();
}