Encrypting existing tar.gz archive
I know of a method to encrypt a tar.gz archive while creating it (not sure if it's a recommend one):
tar -czvf /path/to/save/archive.tar.gz -C /path/to/archive . |
openssl des3 -salt -k #PASSWORD# | dd of=archive
The problem is that I have some large existing archives that I'd like to encrypt also, but I'm not sure if that is possible without re-archiving everything?
tar openssl gzip
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I know of a method to encrypt a tar.gz archive while creating it (not sure if it's a recommend one):
tar -czvf /path/to/save/archive.tar.gz -C /path/to/archive . |
openssl des3 -salt -k #PASSWORD# | dd of=archive
The problem is that I have some large existing archives that I'd like to encrypt also, but I'm not sure if that is possible without re-archiving everything?
tar openssl gzip
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I know of a method to encrypt a tar.gz archive while creating it (not sure if it's a recommend one):
tar -czvf /path/to/save/archive.tar.gz -C /path/to/archive . |
openssl des3 -salt -k #PASSWORD# | dd of=archive
The problem is that I have some large existing archives that I'd like to encrypt also, but I'm not sure if that is possible without re-archiving everything?
tar openssl gzip
I know of a method to encrypt a tar.gz archive while creating it (not sure if it's a recommend one):
tar -czvf /path/to/save/archive.tar.gz -C /path/to/archive . |
openssl des3 -salt -k #PASSWORD# | dd of=archive
The problem is that I have some large existing archives that I'd like to encrypt also, but I'm not sure if that is possible without re-archiving everything?
tar openssl gzip
tar openssl gzip
edited Oct 24 '15 at 4:46
Ned Schneebly
asked Oct 24 '15 at 4:40
Ned SchneeblyNed Schneebly
135
135
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can encrypt any existing file with the same encryption tool and options, using standard shell redirection. For example:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz
if you want to replace the old file with the new encrypted version, then:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz && mv -f newfile.tar.gz oldfile.tar.gz
I might be trying to decrypt incorrectly, but when i useopenssl des3 -d -k #PASSWORD# | tar -C tmp -xvf newfile.tar.gzthere's an error:gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now error reading input file
– Ned Schneebly
Oct 24 '15 at 5:07
newfile.tar.gz needs to be read by openssl, not an arg to tar.openssl des3 -d -k #PASSWORD# < newfile.tar.gz | tar xvfz - -C tmp
– cas
Oct 24 '15 at 6:41
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f238298%2fencrypting-existing-tar-gz-archive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can encrypt any existing file with the same encryption tool and options, using standard shell redirection. For example:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz
if you want to replace the old file with the new encrypted version, then:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz && mv -f newfile.tar.gz oldfile.tar.gz
I might be trying to decrypt incorrectly, but when i useopenssl des3 -d -k #PASSWORD# | tar -C tmp -xvf newfile.tar.gzthere's an error:gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now error reading input file
– Ned Schneebly
Oct 24 '15 at 5:07
newfile.tar.gz needs to be read by openssl, not an arg to tar.openssl des3 -d -k #PASSWORD# < newfile.tar.gz | tar xvfz - -C tmp
– cas
Oct 24 '15 at 6:41
add a comment |
You can encrypt any existing file with the same encryption tool and options, using standard shell redirection. For example:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz
if you want to replace the old file with the new encrypted version, then:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz && mv -f newfile.tar.gz oldfile.tar.gz
I might be trying to decrypt incorrectly, but when i useopenssl des3 -d -k #PASSWORD# | tar -C tmp -xvf newfile.tar.gzthere's an error:gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now error reading input file
– Ned Schneebly
Oct 24 '15 at 5:07
newfile.tar.gz needs to be read by openssl, not an arg to tar.openssl des3 -d -k #PASSWORD# < newfile.tar.gz | tar xvfz - -C tmp
– cas
Oct 24 '15 at 6:41
add a comment |
You can encrypt any existing file with the same encryption tool and options, using standard shell redirection. For example:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz
if you want to replace the old file with the new encrypted version, then:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz && mv -f newfile.tar.gz oldfile.tar.gz
You can encrypt any existing file with the same encryption tool and options, using standard shell redirection. For example:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz
if you want to replace the old file with the new encrypted version, then:
openssl des3 -salt -k #PASSWORD# < oldfile.tar.gz > newfile.tar.gz && mv -f newfile.tar.gz oldfile.tar.gz
answered Oct 24 '15 at 4:54
cascas
39.1k454101
39.1k454101
I might be trying to decrypt incorrectly, but when i useopenssl des3 -d -k #PASSWORD# | tar -C tmp -xvf newfile.tar.gzthere's an error:gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now error reading input file
– Ned Schneebly
Oct 24 '15 at 5:07
newfile.tar.gz needs to be read by openssl, not an arg to tar.openssl des3 -d -k #PASSWORD# < newfile.tar.gz | tar xvfz - -C tmp
– cas
Oct 24 '15 at 6:41
add a comment |
I might be trying to decrypt incorrectly, but when i useopenssl des3 -d -k #PASSWORD# | tar -C tmp -xvf newfile.tar.gzthere's an error:gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now error reading input file
– Ned Schneebly
Oct 24 '15 at 5:07
newfile.tar.gz needs to be read by openssl, not an arg to tar.openssl des3 -d -k #PASSWORD# < newfile.tar.gz | tar xvfz - -C tmp
– cas
Oct 24 '15 at 6:41
I might be trying to decrypt incorrectly, but when i use
openssl des3 -d -k #PASSWORD# | tar -C tmp -xvf newfile.tar.gz there's an error: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now error reading input file– Ned Schneebly
Oct 24 '15 at 5:07
I might be trying to decrypt incorrectly, but when i use
openssl des3 -d -k #PASSWORD# | tar -C tmp -xvf newfile.tar.gz there's an error: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now error reading input file– Ned Schneebly
Oct 24 '15 at 5:07
newfile.tar.gz needs to be read by openssl, not an arg to tar.
openssl des3 -d -k #PASSWORD# < newfile.tar.gz | tar xvfz - -C tmp– cas
Oct 24 '15 at 6:41
newfile.tar.gz needs to be read by openssl, not an arg to tar.
openssl des3 -d -k #PASSWORD# < newfile.tar.gz | tar xvfz - -C tmp– cas
Oct 24 '15 at 6:41
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f238298%2fencrypting-existing-tar-gz-archive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown