Created
February 27, 2019 16:34
-
-
Save gvych/f0a897fd816402b2309f0f554e2630c8 to your computer and use it in GitHub Desktop.
encrypt text using ssh-keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Encrypt: | |
echo secure message to send | openssl rsautl -encrypt -oaep -pubin -inkey <(ssh-keygen -e -f ~/.ssh/id_rsa.pub -m PKCS8) | base64 | |
O4O4V...PawicXqomdrY71Qxw== | |
Decrypt: | |
echo 'O4O4V...PawicXqomdrY71Qxw==' | base64 -d | openssl rsautl -decrypt -oaep -inkey ~/.ssh/id_rsa | |
Enter pass phrase for .ssh/id_rsa: | |
secure message to send |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment