Come verificare il vostro download di Ubuntu | Ubuntu

A seconda della vostra piattaforma, potreste aver bisogno o meno di scaricare la chiave pubblica usata per autenticare il file checksum (Ubuntu e la maggior parte delle varianti sono dotate delle relative chiavi preinstallate). Il modo più semplice per scoprire se avete bisogno della chiave è eseguire il comando di autenticazione:

gpg --keyid-format long --verify SHA256SUMS.gpg SHA256SUMS

In questo tutorial usiamo gli ID delle chiavi “lunghe” (64-bit) di GnuPG, poiché gli ID delle chiavi “corte” (32-bit) non sono sicuri.

Se non avete le chiavi…

Se non è già presente una chiave pubblica per Ubuntu, otterrete un messaggio di errore simile al seguente:

gpg: Signature made Thu Apr 5 22:19:36 2018 EDT using DSA key ID 46181433FBB75451gpg: Can't check signature: No public keygpg: Signature made Thu Apr 5 22:19:36 2018 EDT using RSA key ID D94AA3F0EFE21092gpg: Can't check signature: No public key

Questo è in realtà un messaggio molto utile, poiché ci dice quale chiave o quali chiavi sono state usate per generare il file di firma. Conoscere questi numeri ID (46181433FBB75451 e D94AA3F0EFE21092 nell’esempio), significa che possiamo richiederli al server delle chiavi di Ubuntu.

Questo viene fatto con il seguente comando. Notate che i numeri ID sono esadecimali, quindi li prefissiamo con 0x:

gpg --keyid-format long --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x46181433FBB75451 0xD94AA3F0EFE21092

Questo comando dovrebbe recuperare le chiavi che vogliamo e aggiungerle al vostro portachiavi. Dovreste vedere un messaggio come questo:

gpg: requesting key 46181433FBB75451 from hkp server keyserver.ubuntu.comgpg: requesting key D94AA3F0EFE21092 from hkp server keyserver.ubuntu.comgpg: /root/.gnupg/trustdb.gpg: trustdb createdgpg: key 46181433FBB75451: public key "Ubuntu CD Image Automatic Signing Key <[email protected]>" importedgpg: key D94AA3F0EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>" importedgpg: no ultimately trusted keys foundgpg: Total number processed: 2gpg: imported: 2 (RSA: 1)

Ora potete ispezionare le impronte delle chiavi eseguendo:

gpg --keyid-format long --list-keys --with-fingerprint 0x46181433FBB75451 0xD94AA3F0EFE21092

…che dovrebbe produrre il seguente output:

pub dsa1024/46181433FBB75451 2004-12-30 Key fingerprint = C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451uid Ubuntu CD Image Automatic Signing Key <[email protected]>pub rsa4096/D94AA3F0EFE21092 2012-05-11 Key fingerprint = 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092uid Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *