$ gpg --recv-keys 02D524BE
gpg: requesting key 02D524BE from hkp server pgp.mit.edu
gpg: key 02D524BE: duplicated user ID detected - merged
gpg: key 02D524BE: public key "Florian Weimer (HIGH SECURITY KEY) " imported
gpg: public key 5E13C7DB is 715511958 seconds newer than the signature
gpg: 3 marginal(s) needed, 1 complete(s) needed, classic trust model
gpg: depth: 0 valid: 2 signed: 38 trust: 0-, 0q, 0n, 0m, 0f, 2u
gpg: depth: 1 valid: 38 signed: 28 trust: 6-, 12q, 0n, 6m, 14f, 0u
gpg: depth: 2 valid: 14 signed: 14 trust: 2-, 4q, 0n, 2m, 6f, 0u
gpg: depth: 3 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 2f, 0u
gpg: next trustdb check due at 2008-12-13gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
$ gpg --verify dowkd.pl.gz.asc
gpg: Signature made Tue May 13 22:09:19 2008 CST using RSA key ID 02D524BE
gpg: Good signature from "Florian Weimer (HIGH SECURITY KEY) "
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: C8D3 D9CF FA9E 7056 3F32 FA54 BF7B FF04 02D5 24BE
確認檔案正確後,將其解開
$ gunzip dowkd.pl.gz
指令的用法很簡單,它可以用來檢查金鑰檔、host keys、user keys.
$ perl dowkd.pl help
usage: dowkd.pl [OPTIONS...] COMMAND [ARGUMENTS...]
COMMAND is one of:
file: examine files on the command line for weak keys
host: examine the specified hosts for weak SSH keys
user: examine user SSH keys for weakness; examine all users if no
users are given
help: show this help screen
OPTIONS is one pf:
-c FILE: set the database cache file name (default: dowkd.db)
dowkd currently handles OpenSSH host and user keys and OpenVPN shared
secrets, as long as they use default key lengths and have been created
on a little-endian architecture (such as i386 or amd64). Note that
the blacklist by dowkd may be incomplete; it is only intended as a
quick check.
$ perl dowkd.pl host kalug.linux.org.tw
# kalug.linux.org.tw SSH-2.0-OpenSSH_4.3p2 Debian-9
# kalug.linux.org.tw SSH-2.0-OpenSSH_4.3p2 Debian-9
kalug.linux.org.tw: weak key
kalug.linux.org.tw: weak key
$ perl dowkd.pl user
/home/chihchun/.ssh/id_rsa.pub:1: weak key