@Test public void testServerWithPrincipal() throws UnknownHostException { KerberizedSshServer server = new KerberizedSshServer(1235, "aFile", "host/localhost"); SshServer sshServer = server.getServer(); GSSAuthenticator authenticator = sshServer.getGSSAuthenticator(); assertNotNull(authenticator); String principal = (String) getField(authenticator, "servicePrincipalName"); assertEquals(principal, "host/localhost"); assertEquals(1235,sshServer.getPort()); }
SshServer getServer() { return server; }
KerberizedSshServer { SshServer getServer() { return server; } }
KerberizedSshServer { SshServer getServer() { return server; } KerberizedSshServer(int port, String keytab, String principalName); }
KerberizedSshServer { SshServer getServer() { return server; } KerberizedSshServer(int port, String keytab, String principalName); void start(); static void main(String args[]); }
KerberizedSshServer { SshServer getServer() { return server; } KerberizedSshServer(int port, String keytab, String principalName); void start(); static void main(String args[]);  }