String sshPrivateKey = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY);
String sshPrivateKeyPass = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY_PASS);
String sshPassword = configurationProperties.getProperty(Constants.SSH_PASSWORD);
String sshPublicKey = configurationProperties.getProperty(Constants.SSH_PUBLIC_KEY);
SSHSecurityContext sshSecurityContext = new SSHSecurityContext();
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);