1
0
mirror of https://github.com/5im-0n/sshenc.sh.git synced 2025-08-02 19:30:05 +02:00

initial commit

This commit is contained in:
s2
2017-10-25 15:28:28 +02:00
commit b3573ed635
2 changed files with 78 additions and 0 deletions

22
README.md Normal file
View File

@@ -0,0 +1,22 @@
# sshencdec.sh
bash script to encrypt data using a users ssh public key.
## 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
```