SFTP: Encrypting or Decrypting Files with PGP

Jayden Bartram
Sep 15 · 2 min read

There is a growing demand to be able to encrypt files or decrypt files during an upload or download when using the likes of SFTP (secure file transfer). Couchdrop’s Cloud SFTP offers this as part of its managed file transfer (MFT) solution that provides file automation and workflows based on events.

This post will quickly cover how to configure encrypting PGP as part of your SFTP file upload workflow, you can also follow the same steps to decrypt file encrypted with PGP.

Before starting this configuration, it is expected that you have already configured a storage backend (this could be SharePoint, Google Drive, or Couchdrop’s hosted storage itself). Additionally, you may have also configured an additional SFTP user who is restricted to a specific directory within your backend storage.

Configuring PGP Encryption on an SFTP file upload

  • Provide the workflow a name
  • Set the conditions that will trigger the encryption of the files, in this case when the user sftpdemo1 uploads a file to /couchdrop/encrypted/* the file will be encrypted.
  • Set the action to PGP Encrypt File; provide your PGP key and the full path for the file to be copied to, including the filename. You can also use the variable {EXISTING_NAME} to retain its original name.
  • We’ve also chosen to delete the file once encrypted and as it has been copied to another location, when ready Save Workflow
  • Enable the workflow
  • Then once you upload a file it will be automatically encrypted using your PGP key. You can check the actions of what has happened under the audit log.

For more guides on Couchdrop’s SFTP and cloud file transfer server and or its automation functionality, head to community.couchdrop.io or jump to Couchdrop’s website.

Couchdrop

Couchdrop is your cloud SFTP server and virtual file system for the cloud.

Couchdrop

Couchdrop is your cloud SFTP server. It helps you SFTP/FTP, SCP and Rsync directly into your cloud storage. Couchdrop is developer ready and offers a API and webhooks. It works with all widely used cloud storage endpoints, such as Dropbox, Box, Google Drive, Wasabi, S3, etc.

Jayden Bartram

Written by

CEO of Couchdrop and Movebot

Couchdrop

Couchdrop is your cloud SFTP server. It helps you SFTP/FTP, SCP and Rsync directly into your cloud storage. Couchdrop is developer ready and offers a API and webhooks. It works with all widely used cloud storage endpoints, such as Dropbox, Box, Google Drive, Wasabi, S3, etc.