Skip to main content
July 11, 2024
Question

SFTP Send File - 'invalid private key: [B@5bbde572'

  • July 11, 2024
  • 10 replies
  • 0 views

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.

I know the private key works fine because I have used it in FileZilla.

    10 replies

    July 11, 2024

    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
    )

    jarunbAuthor
    July 11, 2024

    Ok can share me the Third-Party Credentials

    July 11, 2024

    Your above configuration looks good to me.

    prathameshk2938
    July 15, 2024

    Hi [mention:891ac2574f084bc99b414da8d1fdce66:e9ed411860ed4f2ba0265705b8793d05] 

    Did you got any solution for this issue ?

    jarunbAuthor
    July 15, 2024

    Nope