HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
Making and encrypting a tarball
- E.g. Make an encrypted tarball myW08.tar.xz.txt.
- Working directory: “~/tmp/”
- Folder name: W08/.
- Dummy file names: dummy1.ova and dummy2.ova.
- Do “touch” two dummy files** (Just For This Example).
INPUT01
mkdir W08
cd W08
touch dummy1.ova dummy2.ova
ls -al
OUTPUT01
cbkadal@osp:~/tmp$ mkdir W08
cbkadal@osp:~/tmp$ cd W08
cbkadal@osp:~/tmp/W08$ touch dummy1.ova dummy2.ova
cbkadal@osp:~/tmp/W08$ ls -al
total 8
drwxr-xr-x 2 cbkadal cbkadal 4096 Nov 24 20:07 .
drwxr-xr-x 3 cbkadal cbkadal 4096 Nov 24 20:07 ..
-rw-r--r-- 1 cbkadal cbkadal 0 Nov 24 20:07 dummy1.ova
-rw-r--r-- 1 cbkadal cbkadal 0 Nov 24 20:07 dummy2.ova
- Sign the dummy files (armor, detach): dummy1.ova.asc and dummy2.ova.asc.
INPUT02
gpg -o dummy1.ova.asc -a -sb dummy1.ova
gpg -o dummy2.ova.asc -a -sb dummy2.ova
ls -al
OUTPUT02
cbkadal@osp:~/tmp/W08$ gpg -o dummy1.ova.asc -a -sb dummy1.ova
cbkadal@osp:~/tmp/W08$ gpg -o dummy2.ova.asc -a -sb dummy2.ova
cbkadal@osp:~/tmp/W08$ ls -al
total 16
drwxr-xr-x 2 cbkadal cbkadal 4096 Nov 24 20:08 .
drwxr-xr-x 3 cbkadal cbkadal 4096 Nov 24 20:07 ..
-rw-r--r-- 1 cbkadal cbkadal 0 Nov 24 20:07 dummy1.ova
-rw-r--r-- 1 cbkadal cbkadal 833 Nov 24 20:08 dummy1.ova.asc
-rw-r--r-- 1 cbkadal cbkadal 0 Nov 24 20:07 dummy2.ova
-rw-r--r-- 1 cbkadal cbkadal 833 Nov 24 20:08 dummy2.ova.asc
- Verify signatures.
INPUT03
gpg --verify dummy1.ova.asc dummy1.ova
gpg --verify dummy2.ova.asc dummy2.ova
OUTPUT03
cbkadal@osp:~/tmp/W08$ gpg --verify dummy1.ova.asc dummy1.ova
gpg: Signature made Tue Nov 24 20:08:13 2020 WIB
gpg: using RSA key C13787F94073986F0FE39A4E6BE9DC2074F27BF1
gpg: Good signature from "Cicak Bin Kadal (CBK) <cbk@dummy>" [ultimate]
cbkadal@osp:~/tmp/W08$ gpg --verify dummy2.ova.asc dummy2.ova
gpg: Signature made Tue Nov 24 20:08:21 2020 WIB
gpg: using RSA key C13787F94073986F0FE39A4E6BE9DC2074F27BF1
gpg: Good signature from "Cicak Bin Kadal (CBK) <cbk@dummy>" [ultimate]
cbkadal@osp:~/tmp/W08$
- Create tarball myW08.tar.xz.
INPUT04
cd ..
ls -al
tar cfj myW08.tar.xz W08/
tar tfj myW08.tar.xz
OUTPUT04
cbkadal@osp:~/tmp/W08$ cd ..
cbkadal@osp:~/tmp$ ls -al
total 12
drwxr-xr-x 3 cbkadal cbkadal 4096 Nov 24 20:17 .
drwx--x--x 13 cbkadal cbkadal 4096 Nov 24 09:06 ..
drwxr-xr-x 2 cbkadal cbkadal 4096 Nov 24 20:08 W08
cbkadal@osp:~/tmp$ tar cfj myW08.tar.xz W08/
cbkadal@osp:~/tmp$ tar tfj myW08.tar.xz
W08/
W08/dummy2.ova
W08/dummy2.ova.asc
W08/dummy1.ova.asc
W08/dummy1.ova
- Encrypt tarball myW08.tar.xz.txt.
- Recepient #1: operatingsystems@vlsm.org (submission).
- Recepient #2: cbk@dummy (yourself).
INPUT05
gpg -o myW08.tar.xz.txt -a -v -r cbk@dummy -r operatingsystems@vlsm.org -e myW08.tar.xz
OUTPUT05
cbkadal@osp:~/tmp$ gpg -o myW08.tar.xz.txt -a -v -r cbk@dummy -r operatingsystems@vlsm.org -e myW08.tar.xz
gpg: using pgp trust model
gpg: using subkey 4B5BBD0444170902 instead of primary key D0F5DBDD67DF6DDE
gpg: automatically retrieved 'operatingsystems@vlsm.org' via Local
gpg: This key belongs to us
gpg: using subkey 888761102F88AAD3 instead of primary key 6BE9DC2074F27BF1
gpg: automatically retrieved 'cbk@dummy' via Local
gpg: This key belongs to us
gpg: reading from 'myW08.tar.xz'
gpg: writing to 'myW08.tar.xz.txt'
gpg: 'myW08.tar.xz' already compressed
gpg: RSA/AES256 encrypted for: "888761102F88AAD3 Cicak Bin Kadal (CBK) <cbk@dummy>"
gpg: RSA/AES256 encrypted for: "4B5BBD0444170902 Operating Systems (OS) <operatingsystems@vlsm.org>"
cbkadal@osp:~/tmp$
- Decrypted Tarball File (For TESTING only).
- Test file: test-tar-file.tar.xz.
INPUT06
ls -al
gpg -o test-tar-file.tar.xz -d myW08.tar.xz.txt
tar tf test-tar-file.tar.xz
OUTPUT06
cbkadal@osp:~/tmp$ ls -al
total 20
drwxr-xr-x 3 cbkadal cbkadal 4096 Nov 24 20:21 .
drwx--x--x 13 cbkadal cbkadal 4096 Nov 24 09:06 ..
drwxr-xr-x 2 cbkadal cbkadal 4096 Nov 24 20:08 W08
-rw-r--r-- 1 cbkadal cbkadal 1603 Nov 24 20:17 myW08.tar.xz
-rw-r--r-- 1 cbkadal cbkadal 2723 Nov 24 20:21 myW08.tar.xz.txt
cbkadal@osp:~/tmp$ gpg -o test-tar-file.tar.xz -d myW08.tar.xz.txt
gpg: encrypted with 4096-bit RSA key, ID 4B5BBD0444170902, created 2020-02-13
"Operating Systems (OS) <operatingsystems@vlsm.org>"
gpg: encrypted with 4096-bit RSA key, ID 888761102F88AAD3, created 2020-09-28
"Cicak Bin Kadal (CBK) <cbk@dummy>"
cbkadal@osp:~/tmp$ tar tf test-tar-file.tar.xz
W08/
W08/dummy2.ova
W08/dummy2.ova.asc
W08/dummy1.ova.asc
W08/dummy1.ova
cbkadal@osp:~/tmp$