gpg: keyserver receive failed: Connection timed out

By xngo on July 13, 2019


Got connection timed out when trying to get the gpg key. For example,

gpg --keyserver --recv-keys 04EE7237B7D453EC


This is usually caused by your firewall blocking the port 11371. You could unblock the port in your firewall. In case you don't have access to the firewall, you could force gpg to use port 80 instead of 11371. For example,

gpg --keyserver hkp:// --recv-keys 04EE7237B7D453EC 648ACFD622F3D138

About the author

Xuan Ngo is the founder of He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.