How do I verify that the system using correct GPG keys to verify all patches, packages and update installed from RHN or repo under RHEL 5 or 6 server operating systems?
All packages can be cryptographically verified using the rpm / yum and gpg command itself. You need to use /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release file. All packages from RHN or 3rd party Fedora Linux repo are signed with a GPG signature. The yum command will verify these signatures and refuse to install any packages that are not signed or have bad signatures. This make sure that the packages from RHN was provided by the Red Hat, Inc and have not been modified by anyone else.
Verify Installed Keys
To verify that the keys installed on your RHEL server system match the key listed here, use GnuPG to check that the fingerprint of the key matches:
# gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Sample outputs:
pub 4096R/FD431D51 2009-10-22 Red Hat, Inc. (release key 2)Key fingerprint = 567E 347A D004 4ADE 55BA 8A5F 199E 2F91 FD43 1D51 pub 1024D/2FA658E0 2006-12-01 Red Hat, Inc. (auxiliary key) Key fingerprint = 43A6 E49C 4A38 F4BE 9ABF 2A53 4568 9C88 2FA6 58E0
If you use Fedora Linux packages, see this page for more information. If you use CentOS Linux packages, go here for more information.
How Do I Make Sure That the System Has the Red Hat GPG Key Installed?
Type the following command:
# rpm -q --queryformat "%{SUMMARY}\n" gpg-pubkey
Sample outputs (should match as follows - taken from RHEL v6.1 - Santiago):
gpg(Red Hat, Inc. (release key 2)) gpg(Red Hat, Inc. (auxiliary key) )
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 0 comments… add one now }