gpg: keyserver receive failed: Connection timed out

Sometimes adding keyserver doesn't work or timeout. For this we can get the public key directly from OpenPGP keyserver and add it to apt.






  • Hit search key
  • click on pub
  • Copy the key and save it any file (key.txt)
  • Now enter command 
sudo apt-key add key.txt

Comments