Generate a secure GPG key

For some reason gpg gen-key still defaults to SHA1 and RSA2048, due to the known weaknesses of SHA1 it is probably a better idea to use SHA256. First of all, we need to create a configuration file. cat ~/.gnupg/gpg.conf" --- personal-digest-preferences SHA256 cert-digest-algo SHA256 default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed To generate a new key type (also specify to use RSA 4096): gpg --gen-key ### or gpg --full-generate-key Other useful commands are: …

Posted on

Pacman email updates notification

Pacman as long as I know does not provide any method for sending an email notification when there are updates available. SSH into the Arch box just to find out if there are updates available is really annoying so I wrote a simple bash script to do the dirty work on my behalf. [root@arch ~]# cat /etc/cron.daily/check4updates.sh #!/bin/bash HOST=hostname DOMAIN=domain SUBJECT="System update: $HOST@$DOMAIN" EMAIL_ADDR="name@domain" ### Query pacman for available updates updates_raw=$(pacman -Syu <<< n) if echo $updates_raw | grep "there is nothing to do" then echo Everything is up to date else updates=${updates_raw#*Packages ([1-9])} ### extract packages update list up_raw=${updates%Total Download*} up=$(echo $up_raw | tr ' ' '\n') #echo -e "$up" > report. …

Posted on