[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gpg to a pipe

It's a little hard-core, but I CAN pipe over ftp - I just found yout how.

Fro a case, that anybody else need this, here is the script:



cd /backup

mknod week.tar p
mknod week.tar.gpg p

tar -cpf week.tar --exclude=proc / &

echo "password" | gpg -c --passphrase-fd 0 \
        --no-tty --status-fd 1 --output=- week.tar > week.tar.gpg &

ftp -n the.server.com << EOF
quote USER user
quote PASS password
del week.tar.gpg
put |"cat week.tar.gpg" week.tar.gpg

rm week.tar*


exit 0

####### end of script

Many thanks for help


Boris Pavlov wrote:
you can not pipe thru ftp client. ftp is file-oriented.

use ssh instead.

wwell edi

Antonin Karasek wrote:

Many thanks - it works.

But there is another problem. I want ftp to read the file from a pipe. I get this error:

local: backup.tar.gpg remote: backup.tar.gpg
backup.tar.gpg: not a plain file.

(backup.tar.gpg is a pipe)

Is it anyhow possible to force ftp to read the file from a pipe?

Many thanks again.debian-isp@lists.debian.orgdebian-isp@lists.debian.org

David Marceau wrote:

Antonin Karasek wrote:

I tryed to do that, but I wasn't able to force gpg to write the encrypted data to a pipe.

gpg --armor --output=- --encrypt --recipient whoevever@wherever.org backup.tar|more

Reply to: