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

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    thank you that really helped me to adjust the process , i have created a third party credentials from the admin console also set both feilds "username" and "password" and affect the key to the scsExternalSystemKey parameter as shown here:

    = 'type!{http://plugins.ps.appiancorp.com/suite/types/}FT_Config'(
    privateKeyFile: cons!ETT_SERVER_PRIVATE_KEY_RSA,
    serverHostName: cons!ETT_Hostname,
    serverPort: 22,
    timeout: 20000,
    usePerUserCredentials: false(),
    scsExternalSystemKey: "credentials"
    )

    but still the process goes until the end node without creating any file on the remote server

    and this is the third party credentials interface : 

    the problem is im not facing any error this is why i can t resolve it 

  • +1
    Certified Lead Developer
    in reply to hamzas0003

    Are there any Error or Status values being returned from your sFTP node?

    Can you share your "remote file path" and "document to send" configurations?  Note that the "remote file path" should include the sFTP server's path from root as well as the full eventual remote filename, as specified in the sFTP plug-in documentation.

Reply Children