Created
January 20, 2016 22:35
-
-
Save joshq00/bfef50326b1cedc5085e to your computer and use it in GitHub Desktop.
encode with ssh key
This file contains 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
#!/bin/bash | |
# generate pub key | |
ssh-keygen -f ~/.ssh/id_rsa.pub -e -m PKCS8 > ~/.ssh/id_rsa.pem.pub | |
# encrypt | decrypt | |
openssl rsautl -encrypt -pubin -inkey ~/.ssh/id_rsa.pem.pub -ssl <<< somestring | | |
openssl rsautl -decrypt -inkey ~/.ssh/id_rsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment