SFTP Send File to a remote server

Certified Associate Developer

Hello,

I'm trying to send a file from my Appian application to a remote server that has its own hostname, username, password, and key file. I have implemented the process to do this.

While attempting to connect to this remote server, I have configured the file transfer configuration like this:

'type!{plugins.ps.appiancorp.com/.../}FT_Config'( serverPort: 22, serverHostName: cons!ETT_HostName, privateKeyFile: cons!ETT_SERVER_PRIVATE_KEY_RSA )

However, I still don't know how to successfully connect to the server, even though the process does not throw any errors. How can I resolve this? I'm really stuck; I can't find documentation, tutorials, or even an explanation of how the plugin works for beginners, which is a very terrible thing for such an important plugin.

The problem is that the process is not throwing any errors and there's no logic to connect to the server without the username and password.

  Discussion posts and replies are publicly visible

Parents Reply
  • +1
    Certified Lead Developer
    in reply to hamzas0003

    If your sFTP server just has username/password configuration, you would merely pass in the SCS external system key from the one you've hopefully already added into your Third Party Credential store in the Admin console. 

    The FT_Config object you eventually want to be passing over via the Smart Service can be as simple as this example, which is my current working one except for some object names sanitized:

    'type!{http://plugins.ps.appiancorp.com/suite/types/}FT_Config'(
      serverHostName: cons!PROJ_sFTP_HOST_NAME,
      /*e.g. serverHostName: "test.rebex.net",*/
      serverPort: 22,
      timeout: 20000,
      scsExternalSystemKey: cons!PROJ_sFTP_EXTERNAL_SYSTEM_KEY,
      usePerUserCredentials: false()
    )

    (for yours, I assume you would continue also including the reference to your Private Key File just as you have it.  But you'd definitely need to add the External System Key.)

Children