Automate OpenPGP Command Line

How to Automate OpenPGP Command Line

OpenPGP is your encryption standard, but PGP command line tools make the simplest encryption task difficult and time-consuming.

You started with a few command line scripts. Now, you have dozens—or hundreds! You can’t possibly manage and maintain them all. And any mistakes could have dire consequences for data security and privacy.

Our Diplomat MFT managed file transfer software makes encrypting files with PGP easy. Whether you choose Diplomat MFT’s PGP command line console for leading tools (such as McAfee® E-Business Server and Symantec® PGP Command Line Server), or Diplomat MFT’s built-in OpenPGP encryption, Coviant Software has you covered.

Either way, you can automate PGP encryption with an intuitive, easy-to-use application. You get robust, PGP-compliant encryption while taking advantage of Diplomat MFT’s business-critical, secure file transfer features.

∙ Simplify PGP file encryption.
Easily create and maintain PGP encryption jobs. No complicated programming or batch scripts to encrypt or decrypt files. Diplomat MFT issues the right PGP command when encryption or decryption is needed.

∙ Automate PGP encryption.
Schedule PGP encryption jobs to run automatically by minutes, hours, daily, or monthly. Plus, manually initiate PGP encryption jobs when needed.

∙ Protect PGP passphrases and other sensitive data.
Protect authentication information, such as private key passphrases and login information. Since PGP encryption set-up data is encrypted before being written to disk, you don’t have to worry about sensitive data in unprotected batch files.


Hi, this is Eric with Coviant Software. Most of you know Diplomat MFT as an award winning, high value managed file transfer platform that allows you to do simple to very complex file transfer encryption processes with just filling in the blanks and setting up your preferences for that process. What some people don’t realize is that Diplomat can be used to encrypt and decrypt files directly from a batch file or a script or some other application server.

And you can do that without defining necessarily a process to do that within Diplomat itself. Of course, you can call a process, but you can also directly do the encryption. I’m going to show you what that looks and feels like. So to start with, we’re going to look at this text file I have here on my temp folder.

It’s not very large, only 375K, contains a lot of text. I can read it, no problem. So what I’m going to do is I’m going to go ahead and open a command prompt here. And I’m going to go ahead and enter a command line to, um, encrypt this file. And very simply, I’m invoking the scripting agent. It’s part of diplomat MFT enterprise.

And I’m going to use it to encrypt that file with that example key pair. Now there are a number of different options you can do here as well. You can use additional encryption keys. You can choose to sign it. There’s all kinds of fun stuff. You can provide different output paths. There’s a lot of capabilities, but for now we’re just going to encrypt it.

There you go. And now we noticed there is a PGP encrypted file here, much smaller because it’s compressed. And if we were to look at that file contents, that’s obviously not the same, no longer readable. It has been encrypted with that key. One thing we can also do in this regard is to go ahead and, uh, add an armour option so that the, uh, output is actually ASCII armoured encryption instead of just the typical, um, Binary formatted PGP encryption.

So this file still exists, but now we have this file here. And if we look at the contents of this file, we see that it is an encrypted message again, but this time it is ASCII armoured. It contains characters that are part of the ASCII character set. Great. Some people need that. So now what we should do, let me go ahead and remove the original file altogether.

And then what I’ll do is go ahead and decrypt that file. Now, when I decrypt this file. All I’m going to do is use that decrypt flag and specify the file I want to decrypt and the key I want to use to do that decryption easy enough. That file is not decrypted. Now there’s a copy of that file in its original form and its original size. And if you look at that contents again. There you go. It is decrypted again with the decryption. There are additional capabilities you have as well, such as, you know, verifying a signature, changing output paths and more.

For more information, please go to coviantsoftware.com and you request a demo or choose to contact us. Maybe send us an email at info at coviantsoftware.com. Thanks so much.

Book a Free MFT Software Demo

Allegheny Energy needed one integrated solution to automate PGP and secure file transfer that would scale to handle rising numbers of secure FTP transfers. Diplomat Managed File Transfer software reduced file transfer errors from 1-2 per day to fewer than one a week.

Learn how Allegheny Energy reduced file transfer errors with Diplomat Managed File Transfer software »