Skip to content

Instantly share code, notes, and snippets.

@DeviaVir
Created September 24, 2015 11:56
Show Gist options
  • Save DeviaVir/4725aced1461d5d80f70 to your computer and use it in GitHub Desktop.
Save DeviaVir/4725aced1461d5d80f70 to your computer and use it in GitHub Desktop.
Intermittent problems with gpg and a NEO key? And you need it to work NOW? Use this.
#!/bin/bash
echo "kill gpg-agent"
code=0
while [ 1 -ne $code ]; do
killall gpg-agent
code=$?
sleep 1
done
echo "kill ssh"
killall ssh
echo "kill ssh muxers"
for pid in `ps -ef | grep ssh | grep -v grep | awk '{print $2}'`; do
kill $pid
done
echo "restart gpg-agent"
eval $(gpg-agent --daemon)
echo
echo "All done. Now unplug / replug the NEO token."
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment