mirror of
https://github.com/5im-0n/sshenc.sh.git
synced 2025-08-02 11:20:05 +02:00
point readme instructions to website
so I don't have to write everything twice every time.
This commit is contained in:
39
README.md
39
README.md
@@ -1,40 +1,3 @@
|
|||||||
# sshenc.sh
|
# sshenc.sh
|
||||||
|
|
||||||
bash script to encrypt data using a users ssh public key.
|
Please see [https://sshenc.sh/](https://sshenc.sh/) (or the index.html file in this repository) for instructions.
|
||||||
|
|
||||||
> 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:
|
|
||||||
|
|
||||||
```
|
|
||||||
./sshenc.sh -s ~/.ssh/id_rsa < file-containing-the-encrypted-text.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
## install
|
|
||||||
```
|
|
||||||
wget wget 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
|
|
||||||
```
|
|
||||||
|
Reference in New Issue
Block a user