Protecting .netrc

Morten Kjærulff mortenkjarulff@gmail.com
Sat Apr 4 11:41:12 GMT 2020


Hi.

No need to say that putting passwords in plain text file is a bad idea.
But if I use .netrc, wouldn't below be a bit (lot?) safer?
Assuming I have a good passphrase on my key.

It seems so simple, that I fear I am not getting anything out of it.

Morten

#!/bin/sh

# Install utils/gnupg2

# gpg2 --generate-key

# mkdir ~/secrets

# gpg2 -e -r YOU@EMAIL.COM <~/.netrc >~/secrets/netrc.enc

# rm ~/.netrc

# mkfifo ~/.netrc

while true ; do
  gpg2 -d <~/secrets/netrc.enc >~/.netrc
done


More information about the Cygwin mailing list