Hello Everyone,
I am using another client’s SFTP server for demo purposes, which uses SSH key pair authentication with a private key that works in FileZilla.
I have created Third-Party Credentials in Appian using the username only and uploaded the private key along with a constant associated with it.
Here is my File Transfer Configurations CDT:
'type!{plugins.ps.appiancorp.com/.../}FT_Config'(
serverHostName: "xyz.com",
serverPort: 22,
scsExternalSystemKey: "aws-cmd",
usePerUserCredentials: false(),
privateKeyFile: tointeger(cons!MS_SFTP_USER_PRIVATE_KEY_FILE)
)
I am getting an error: invalid private key: [B@5bbde572.
invalid private key: [B@5bbde572
I know the private key works fine because I have used it in FileZilla.
Discussion posts and replies are publicly visible
Casting to an integer is not required for the file. See the below for details:
= 'type!{http://plugins.ps.appiancorp.com/suite/types/}FT_Config'( serverHostName: cons!FTP_HOST_NAME, serverPort: 22, scsExternalSystemKey: "ftp-user-name", usePerUserCredentials: false(), privateKeyFile: cons!FTP_PRIVATE_KEY )
Ok can share me the Third-Party Credentials
Your above configuration looks good to me.
But, Still I am getting the same error invalid private key: [B@5bbde572 So Is there specific format for private file which Appian support and any key point which I have take care while working with this type of auth
Are you using the same user(user specified in the username field in the Third-Party Credentials screen) in Appian and FileZilla? Because we can not use the same key with different users.
I just got this username for server team and before using into appian For testing I have use above user in FileZillaI am not sure that I have give fulfil your question or not
Check following threads:
https://stackoverflow.com/questions/53134212/invalid-privatekey-when-using-jsch
https://mkyong.com/java/jsch-invalid-privatekey-exception/