bash script to encrypt data using a users ssh public key https://sshenc.sh
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
s2 ba04e9f548 resize logo vor 7 Monaten
tests tests vor 1 Jahr
README.md remove double header vor 7 Monaten
index.html don't use `fetch`, so google maybe can render the page vor 8 Monaten
logo.png resize logo vor 7 Monaten
main.css add readme vor 9 Monaten
sshenc.sh use $me instead of basename, so it works better when it comes from stdin vor 9 Monaten

README.md

sshenc.sh

bash script to encrypt data using a users ssh public key

If you received a message from someone that was encrypted with this script, you can decrypt it with your ssh private key using the following command without installing anything:

bash <(curl -s https://sshenc.sh/sshenc.sh) -s ~/.ssh/id_rsa < file-containing-the-encrypted-text.txt

sshenc.sh uses openssl under the hood, so you need to have that installed in your path to make it work.

Install

curl -O https://sshenc.sh/sshenc.sh
chmod +x sshenc.sh

Examples

encrypt a file using your own ssh public key

sshenc.sh -p ~/.ssh/id_rsa.pub < plain-text-file.txt > encrypted.txt

encrypt a file using multiple recipients (broadcast encryption)

sshenc.sh -p ~/.ssh/id_rsa.pub -p id_rsa-alice.pub -p id_rsa-bob.pub < plain-text-file.txt > encrypted.txt

encrypt a file using the public key of a github user

sshenc.sh -p <(curl -sf "https://github.com/S2-.keys" | grep ssh-rsa | tail -n1) < plain-text-file.txt

this line fetches the first public key for the github user S2- and encrypts the file plain-text-file.txt using this key.

decrypt a file

sshenc.sh -s ~/.ssh/id_rsa < encrypted.txt

License

MIT