操作步骤:
1、下载并编译SHC
# wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz
# tar zxf shc-3.8.9.tgz
# cd shc-3.8.9
# mkdir -p /usr/local/man/man1
# make install
2、建立一个测试bash脚本start.sh
#!/bin/bash
mysql -uroot -proot
3、使用SHC加密bash脚本start.sh
# shc -f start.sh
4、指定过期时间:
# shc -e 01/01/2020 -m "The script has been expired, please contact Andy Wu!" -f start.sh