1
0
mirror of https://github.com/5im-0n/sshenc.sh.git synced 2025-08-02 11:20:05 +02:00
2017-10-26 15:14:56 +02:00
2017-10-26 14:19:37 +02:00
2017-10-26 15:14:56 +02:00

sshencdec.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:

./sshencdec.sh -s ~/.ssh/id_rsa < file-containing-the-encrypted-text.txt

examples

encrypt a file using your own ssh public key

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

encrypt a file using the public key of a github user

./sshencdec.sh -p <(curl -sf "https://github.com/S2-.keys" | head -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

./sshencdec.sh -s ~/.ssh/id_rsa < encrypted.txt
Description
bash script to encrypt data using a users ssh public key
https://github.com/5im-0n/sshenc.sh
Readme 1.2 MiB
Languages
Shell 75.6%
HTML 21.6%
CSS 2.8%