This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keys=$(gpg-connect-agent 'keyinfo --list' /bye | awk '{print $3}') | |
for key in $keys; do gpg-connect-agent "delete_key $key --force" /bye; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://duo.com/product/multi-factor-authentication-mfa | |
https://fukuchi.org/works/qrencode/ | |
qrencode -l L -v 1 -o test.png 'text_input' | |
Example - qrencode -l L -v 1 -o GoogleText.png 'otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example' | |
For standard Google Authenticator or Authy QR codes, see this example: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -p "How many characters? " numlen | |
#MacOS uses head, linux uses cat /dev/random | |
head /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9,;.:_#*+~!@$%&()=?{[]}|><-' | fold -w $numlen | head -n 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mac and Linux work the same, storing the keys in ~/.gnupg. The safest way to transfer the files is using scp (part of ssh): | |
To copy from your local machine to another: | |
scp -rp ~/.gnupg othermachine: | |
To copy from a remote machine to your local: | |
scp -r othermachine:~/.gnupg ~ | |
If you're on the machine that already has the key: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$HOSTALIASES no longer works with glibc (https://bugs.launchpad.net/debian/+source/glibc/+bug/1483187) | |
For my project, I needed to create a user specifc hosts file. | |
First clone this repo - https://github.com/figiel/hosts.git | |
################ README ##################################### | |
hosts - wrapper for libc which provides defining host aliases in a per-user file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install WireGuard via whatever package manager you use. For me, I use apt. | |
$ sudo add-apt-repository ppa:wireguard/wireguard | |
$ sudo apt-get update | |
$ sudo apt-get install wireguard | |
MacOS | |
$ brew install wireguard-tools | |
Generate key your key pairs. The key pairs are just that, key pairs. They can be |
NewerOlder