Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > File Transfer


Thread Tools Display Modes
Old 06-05-2015, 10:28 AM
fjacques fjacques is offline
Registered User
Join Date: Jun 2015
Posts: 2
SecureFX PGP options


I am trying to configure the PGP options in a SecureFX session but there is not much documentation on how it can be configured.

What has to be entered in the "Pre-upload command" to have the file encrypted before sending to the remote server?
I tried to enter "gpg -r <recipient> -e". It opens a gpg window at file transfer but it prints gibberish data and see "The PGP command failed (-1073741510)." in the log file.
Is there a variable or something to enter to have the file name as argument?

Is that feature also working when using the command line utility (sfxcl.exe).

Thank you,
Reply With Quote
Old 06-05-2015, 01:20 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
We're hoping to improve SecureFX's documentation for PGP functionality. In the mean time, here are a few notes:
  • If "%INPUT_PATH" appears within the PGP command, it is replaced with the input file path (the file being decrypted/encrypted/signed/verified)
  • If "%OUTPUT_PATH" is a variable that SecureFX uses that is replaced with the file resulting from the PGP operation.
  • A file named "file.txt" will end up as "file.txt.pgp" one the remote machine following PGP processing prior to the upload operation.
  • A file named "file.txt.pgp" will end up as "file.txt" on the local machine following PGP processing after the download operation.
  • When uploading files that already have a ".pgp" or a ".gpg" extension, PGP processing will be skipped.

I've included some basic pre-upload and post-download command line examples below.

A best practice would be to open up a CMD window on your SecureFX machine, and rehearse with an actual command line that will work for you to encrypt a specific file (give the full path to the file), using
the --output and --encrypt command line options with full paths to the files.

Then, once you have a command working with literal paths, take that command and copy it into your SecureFX pre-upload command and replace the literal paths with the quoted substitutions for "%OUTPUT_PATH" and "%INPUT_PATH".

Pre-upload example:
gpg.exe --recipient "Name of Recipient's Certificate" --output "%OUTPUT_PATH" --encrypt "%INPUT_PATH"
Post-download example:
gpg.exe --decrypt-files "%INPUT_PATH"

While this information isn't comprehensive, does it get you started in the right direction towards a solution to using PGP with SecureFX in your environment?

Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support

Last edited by jdev; 06-11-2015 at 12:51 PM.
Reply With Quote
Old 06-11-2015, 12:30 PM
fjacques fjacques is offline
Registered User
Join Date: Jun 2015
Posts: 2
This is exactly what I needed.
It's also working with the command line utility (sfxcl.exe)

I noticed that even though I used GnuPG the uploaded file name had a .pgp extension even though it is defaulting to .gpg.
This is not a big deal we will work around that.

Thanks for your input!
Reply With Quote

encrption , gpg , pgp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 11:34 AM.