TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Doing file encryption with SSH keys

6 pointsby gregatragenet3over 8 years ago

2 comments

gregatragenet3over 8 years ago
I infrequently have the need to encrypt some files; and traditionally I've used symmetric encryption with passphrases. But I feel like we're in a post-password world where any phrase that I as a human can remember is short enough that a computer could brute-force it. So I wanted to have something more secure which uses a secret key.. It's infrequent enough that keeping track of a GPG key would be a problem. But as a developer there's a secret key I use on a daily basis which I could leverage - my RSA SSH key. So I wrote a script to use my public/private key to encrypt and decrypt files. Posting this in case others would find it useful. >>>All the usual caveats/disclaimers about using crypto stuff written by a random non-crypt-expert developer etc...<<<
lioetersover 8 years ago
What a coincidence! Earlier today, I was wondering whether SSH could be used in place of GPG for encrypting messages; a common answer was that SSH was designed for a different purpose and that it wouldn&#x27;t make sense to use it this way.<p>And here you&#x27;ve shown how it could be done. The script is interesting and educational to read through. Thanks for sharing.