{"id":985,"date":"2014-02-25T06:51:37","date_gmt":"2014-02-25T06:51:37","guid":{"rendered":"http:\/\/blogs.silicontechnix.com\/?p=985"},"modified":"2014-03-20T08:08:30","modified_gmt":"2014-03-20T08:08:30","slug":"password-encrypted-files-in-linux","status":"publish","type":"post","link":"https:\/\/blogs.silicontechnix.com\/?p=985","title":{"rendered":"Password encrypted files in Linux"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>I am found of keeping password protected backups and most of the time I lost my super secret password thus unable to open my super important backups \ud83d\ude42 just kidding.<\/p>\n<p>Like in windows we can simple right click and zip folders\/files with passwords in text based terminals of linux I always want the same.<\/p>\n<p>So here is the trick I normally use.<\/p>\n<p>For encrypting a file:<\/p>\n<pre class=\"brush:bash\">openssl enc -aes-256-cbc -e &gt; out.file<\/pre>\n<p>It will ask for password like:<\/p>\n<pre class=\"brush:bash\">enter aes-256-cbc encryption password:\r\nVerifying - enter aes-256-cbc encryption password:<\/pre>\n<p>If you want to encrypt a folder with compression (tar.gz)<\/p>\n<pre class=\"brush:bash\">tar -cz foldername | openssl enc -aes-256-cbc -e &gt; out.tar.gz<\/pre>\n<p>Now the important part, decrypting your encrypted files&#8230;.<\/p>\n<pre class=\"brush:bash\">openssl enc -aes-256-cbc -d -in out.file &gt; new.file<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; I am found of keeping password protected backups and most of the time I lost my super secret password thus unable to open my super important backups \ud83d\ude42 just kidding. Like in windows we can simple right click and zip folders\/files with passwords in text based terminals of linux I always want the same. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"no","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[95],"tags":[448,449,450,447,446,19,374,452,451],"class_list":["post-985","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-aes","tag-aes-256-cbc","tag-archive","tag-decrypt","tag-encrypt","tag-linux","tag-openssl","tag-tar","tag-zip"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p12j6H-fT","_links":{"self":[{"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=\/wp\/v2\/posts\/985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=985"}],"version-history":[{"count":2,"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=\/wp\/v2\/posts\/985\/revisions"}],"predecessor-version":[{"id":988,"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=\/wp\/v2\/posts\/985\/revisions\/988"}],"wp:attachment":[{"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.silicontechnix.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}