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

install instructions

This commit is contained in:
s2
2019-01-14 10:33:50 +01:00
parent 9a966e99b4
commit eeb0ef5633

View File

@@ -70,10 +70,28 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h2>Install</h2> <h2>Install</h2>
<hr>
<h3>Install locally</h3>
<div class="bd-callout bd-callout-info"> <div class="bd-callout bd-callout-info">
<code>wget https://sshenc.sh/sshenc.sh<br> <code>wget https://sshenc.sh/sshenc.sh<br>
chmod +x sshenc.sh</code> chmod +x sshenc.sh</code>
</div> </div>
<h3>Run it from remote every time</h3>
If you are
<ul>
<li>really brave, and</li>
<li>want to be sure to run the latest version every time, or</li>
<li>maybe don't want/can't install files</li>
</ul>
you can use an alias that downloads and executes the script ecery time:<br>
<code>alias sshenc.sh='bash <(curl -s https://sshenc.sh/sshenc.sh)'</code>
<br>
<br>
To add it to your environment permanently:<br>
<code>echo "alias sshenc.sh='bash <(curl -s https://sshenc.sh/sshenc.sh)'" >> ~/.bashrc</code>
<br>
<br>
</div> </div>
</div> </div>
@@ -84,23 +102,23 @@
<h3 id="encrypt-own">encrypt a file using your own ssh public key</h3> <h3 id="encrypt-own">encrypt a file using your own ssh public key</h3>
<div class="bd-callout bd-callout-info"> <div class="bd-callout bd-callout-info">
<code>./sshenc.sh -p ~/.ssh/id_rsa.pub < plain-text-file.txt > encrypted.txt</code> <code>sshenc.sh -p ~/.ssh/id_rsa.pub < plain-text-file.txt > encrypted.txt</code>
</div> </div>
<h3 id="encrypt-multi">encrypt a file using multiple recipients (broadcast encryption)</h3> <h3 id="encrypt-multi">encrypt a file using multiple recipients (broadcast encryption)</h3>
<div class="bd-callout bd-callout-info"> <div class="bd-callout bd-callout-info">
<code>./sshenc.sh -p ~/.ssh/id_rsa.pub -p id_rsa-alice.pub -p id_rsa-bob.pub < plain-text-file.txt > encrypted.txt</code> <code>sshenc.sh -p ~/.ssh/id_rsa.pub -p id_rsa-alice.pub -p id_rsa-bob.pub < plain-text-file.txt > encrypted.txt</code>
</div> </div>
<h3 id="encrypt-gh">encrypt a file using the public key of a github user</h3> <h3 id="encrypt-gh">encrypt a file using the public key of a github user</h3>
<div class="bd-callout bd-callout-info"> <div class="bd-callout bd-callout-info">
<code>./sshenc.sh -p <(curl -sf "https://github.com/S2-.keys" | grep ssh-rsa | tail -n1) < plain-text-file.txt</code> <code>sshenc.sh -p <(curl -sf "https://github.com/S2-.keys" | grep ssh-rsa | tail -n1) < plain-text-file.txt</code>
</div> </div>
<p>this line fetches the first public key for the github user S2- and encrypts the file plain-text-file.txt using this key.</p> <p>this line fetches the first public key for the github user S2- and encrypts the file plain-text-file.txt using this key.</p>
<h3 id="decrypt">dedecrypt a file</h3> <h3 id="decrypt">dedecrypt a file</h3>
<div class="bd-callout bd-callout-info"> <div class="bd-callout bd-callout-info">
<code>./sshenc.sh -s ~/.ssh/id_rsa < encrypted.txt</code> <code>sshenc.sh -s ~/.ssh/id_rsa < encrypted.txt</code>
</div> </div>
</div> </div>
</div> </div>
@@ -108,6 +126,7 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h2>License</h2> <h2>License</h2>
<hr>
<a href="https://opensource.org/licenses/MIT">MIT</a> <a href="https://opensource.org/licenses/MIT">MIT</a>
</div> </div>
</div> </div>