A
A
Alghazanth2016-07-13 10:46:55
SSH
Alghazanth, 2016-07-13 10:46:55

How to encrypt and decrypt a string with ssh key pair?

What would the commands for encrypting and decrypting a string with an SSH key pair look like? Interested in exactly how to apply openssl to the input string.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2016-07-13
@Alghazanth

Create a key in PEM format (or convert the current public key to PEM format)
We send the public key to a friend who encrypts the message.txt file with it:
Sends EncryptedMessage.txt to you, and you decrypt it with your private key:

openssl rsautl -decrypt -inkey id_rsa -in EncryptedMessage.txt -out DecryptedMessage.txt

P
protven, 2016-07-13
@protven

superuser.com/questions/576506/how-to-use-ssh-rsa-...
Isn't it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question