Encryption of files.

Latest response

Hi All,

I have quick question, I need to encrypt file send to customers ftp server. I will use sftp and I know it does encryption already. So is there any other ways to do the encryptions I can use.

Thanks in advance .



You can use gpg for that. The simplest way is to use a password, but it also lets you encrypt files using pairs of public and private keys (see gpg(1)). To encrypt a single file with a password, run:

gpg -c file.txt

It will ask for a password, which can then be used to decrypt the file by running:

gpg file.txt.gpg


Or if you're not sure whether the recipient will be able to decrypt the file easily, you can create a password-protected zip archive.

Hi and thanks for feeds, We probably will send more then one file and I'm planing to create a script that will encrypt the file first and transfer it with lftp.

@Robert: If we are going to use gpg. What is the process?
1- Customer will generate a public key
2- and he will sent it to me
3- I will encrypt it with that key and send it all the time?

Is this the process?

Yes, in essence, that's the process. The other party generates a pair of keys: a public one and a private one. They provide you with the public one, which you use to encrypt the data, and they use their private key to decrypt the data.

When encrypting multiple files, you can either encrypt an archive, or use the --multifile option of gpg.

Thanks again,