利用openssl加密解密tar包
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
将文件夹package打成tar包 package.tar.gz 并加密
密码是 password
tar czf – package | openssl des3 -salt -kpassword -out package.tar.gz
加密的tar包只能在Linux上解密,无法在Windows上使用。
解密tar包并且解压缩
openssl des3 -d -k password -salt -in package.tar.gz | tar xzf -
其中 -k password 可以不使用,这样执行完命令后会提示你输入,加上 -k参数可运用在程序中,这样可自动设置密码。
密码是 password
tar czf – package | openssl des3 -salt -kpassword -out package.tar.gz
加密的tar包只能在Linux上解密,无法在Windows上使用。
解密tar包并且解压缩
openssl des3 -d -k password -salt -in package.tar.gz | tar xzf -
其中 -k password 可以不使用,这样执行完命令后会提示你输入,加上 -k参数可运用在程序中,这样可自动设置密码。




A beautiful web dashboard for Linux
最近提交(Master分支:26 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)