4 Replies Latest reply on Jun 15, 2017 12:45 PM by Jason Miller

    How to transfer an attachment via SFTP in remedy?

    ABHISHEK ANAND
      Share:|

      Hi  Experts,

       

      I am working on one requirement in which i am supposed to SFTP attachments/files to another sever. I am looking forward for options by which i can do the same from ARS Remedy 8.1 (Win).

       

      Any suggestion is highly appreciated

      .

       

      Thanks & Regards,

      AA

        • 1. Re: How to transfer an attachment via SFTP in remedy?

          Hi

           

          You could do this:

           

          - On the form where you have the file saved in an attachment field, build a filter which saves the attachment into a folder on your server (by using a "Run Process"-action with "PERFORM-ACTION-SAVE-ATTACHMENT")

           

          - The second action in that filter then does another "Run Process" and this time you run a command-line SFTP-client (or possibly SCP? But I think SCP is different than SFTP, so maybe SCP is not what you want) and you give it the source-file and destination as parameters. (Since the Run Process action can't prompt you for a username/password, you'll have to set up SSH-keys beforehand so that the transfer can go through without user-interaction)

           

          Hope this helps

          • 2. Re: How to transfer an attachment via SFTP in remedy?
            ABHISHEK ANAND

            Please could you provide details for the second step along with a sample.

            • 3. Re: How to transfer an attachment via SFTP in remedy?

              If you google "how to ssh keys windows", then you'll find this link, for example:

              Manually generating your SSH key in Windows

               

              If you google "winscp command line sftp example", then you'll find this, among others:

              Scripting and Task Automation :: WinSCP

               

              I think this should help you.

              • 4. Re: How to transfer an attachment via SFTP in remedy?
                Jason Miller

                To your point, years ago we switched an HR automation process from ftp to scp using pscp. I am pretty sure the driver to switch was we were asked to change the integration to sftp and it was easier/better to go with scp instead (our accounts on the AIX side did need to be changes a little to allow it).

                 

                We are using a .vbs script that Remedy passed arguments to in the Run Process (actually we are performing the Process in a Set Fields because we want an error if it fails). In our case were are creating a .csv file of Remedy and static data so we wrapped it all up in a script. If you are simply passing data you could probably just call pscp from the Run Process directly.

                 

                And now that I have typed that up and re-read your question, you didn't specifically state you are sending the file to a UNIX variant OS. If you are sending it to a system off-network or a Windows sever what I typed really doesn't apply. So, if you still need to use sftp I would do the same as I described above, create a script (I would use PowerShell these days) and call a Windows sftp client from within that script.