Reputation: 39
#!/bin/bash
USERNAME='user'
PASSWORD='1234567890'
printf "$USERNAME\n$PASSWORD" | connect address
How do I encrpyt or hide the value for PASSWORD so that one can't open this bash script file and see the username and password?
Upvotes: 0
Views: 353
Reputation: 145
If you dont want people to open your code you can make a binary from that script:
$ sudo apt install shc # for debian or debian based
$ shc -f script.sh
$ ls -l script.sh.x
Check https://tecadmin.net/create-binary-file-from-shell-script/
Upvotes: 2