Credential credential = getCredentialReader().getCredential(getRequestData().getGatewayId(),
getRequestData().getTokenId());
if (credential instanceof SSHCredential) {
SSHCredential credential1 = (SSHCredential) credential;
this.publicKeyFile = writeFileToDisk(credential1.getPublicKey());
this.privateKeyFile = writeFileToDisk(credential1.getPrivateKey());
this.passPhrase = credential1.getPassphrase();
System.out.println(this.publicKeyFile);
System.out.println(this.privateKeyFile);
System.out.println(this.passPhrase);
this.getRequestData().setRequestUser(credential1.getPortalUserName());
return credential1;
} else {
log.info("Could not find SSH credentials for token - " + getRequestData().getTokenId() + " and "
+ "gateway id - " + getRequestData().getGatewayId());
}