Use age to cipher files
13 Feb 2024 | tags: age opensshCiphering files
We all know about multiple tools to cipher stuff, openssl, gpg, etc… Now I came across a dummy tool called age that might come in handy.
age -R ~/.ssh/id_rsa.pub <(echo hola) > lalala.age
That would use your default public key and pass a file with the contents of “echo hola”. As a result, it would generate a file called “lalala.age”.
To decript the file, you must own the private key.
age -d -i ~/.ssh/id_rsa foo.age > lalala && cat lalala
hola