SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
if (((SSHHostType) registeredHost.getType()).getHpcResource()) {
AuthenticationInfo authenticationInfo = null;
// we give higher preference to the password over keypair ssh authentication
if (sshPassword != null) {
authenticationInfo = new DefaultPasswordAuthenticationInfo(sshPassword);
} else {
authenticationInfo = new DefaultPublicKeyFileAuthentication(sshPublicKey, sshPrivateKey, sshPrivateKeyPass);
}
ServerInfo serverInfo = new ServerInfo(sshUserName, registeredHost.getType().getHostAddress());