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
  • 0
    Certified Lead Developer

    When downloading the plugin, it contains some documentation.

    Then, did you try to check the tomcat stdout log file for details?

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    I'm following just as the documentation says, and it's not helping much. Can you please tell me when to use the scsExternalSystemKey? Should I use it in my case? Also, sorry, I can't access the Tomcat stdout log; it shows me a 403 Forbidden error. Still waiting for my own environment to restart.

  • 0
    Certified Lead Developer
    in reply to hamzas0003

    The tomcat log file is not inside the Tomcat folder.

    Typically you store username and password in the SCS and then use the SCS kay in the plugin. Make sure to allow the plugin access to that SCS item.

  • +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.)

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