Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quick guide to apt-key

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Hints and tips
View previous topic :: View next topic  
Author Message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2439

PostPosted: Sun Nov 04, 2012 2:59 am    Post subject: Quick guide to apt-key Reply with quote

Apt-key is the tool Debian and its derivatives use to manage public keys for its package management tools. This is a quick guide to get you started:

Open a root terminal, or use sudo if your distro is configured to use it, and enter:
Code:
apt-key list
This will list all known keys on your system. A sample to show the general layout:
Code:
pub   4096R/B98321F9 2010-08-07 [expires: 2017-08-05]
uid                  Squeeze Stable Release Key <debian-release@lists.debian.org>

In it, 4096R indicates key length and encryption of the key (RSA in this case), the number B98321F9 is the ID of the key as it's know to your system, the date indicates when it was created (and expire date speaks for itself, I'd assume Wink) followed by the name of the key.

Let's assume you have a key, some_key.asc that you'd want to use. Download it to your user's home directory:
Code:
wget http://www.some.domain.org/some_key.asc
Next, you need to import it:
Code:
apt-key add some_key.asc
To see if the key is imported correctly, update the package list:
Code:
apt-get update
If the key was faulty, incomplete or otherwise unusable, apt will report so.

At some point, a specific key needs to be revoked and removed. This can be done with:
Code:
apt-key del <key-UID>
apt-key list
Listing the keys again allows you to check if the key has been removed from your system. You'd need to update the package list again (see above) to let it forget the revoked key permanently.

Apt-key has a number of other options, use the man-page to study those if you require more then the basics explained above:
Code:
man apt-key

Idea
Back to top
View user's profile Send private message
northumbrian1



Joined: Mon Sep 03, 2012 1:19 am
Posts: 17
Location: northumberland

PostPosted: Mon Dec 17, 2012 11:49 am    Post subject: Apt-get Reply with quote

Very good! I have many of these type of commands, many of whom came via Fosswire or from Linux Format itself in the form of its (now Out-of-print) "A Beginner's Guide To Linux." which I dutifully printed out and sheathed in plastic pages to refer back to when I needed them. Although Ubuntu has changed via its new Desktop (Unity), the basic construct, beneath the surface still exists, that is, its Debian/Ubuntu derivation. I also have quite a few books relating to the administration of Red-Hat type Linux as I have a Laptop with Fuduntu on it which is originally derived from Fedora - which I like, too! Northumrian1
Back to top
View user's profile Send private message Send e-mail
northumbrian1



Joined: Mon Sep 03, 2012 1:19 am
Posts: 17
Location: northumberland

PostPosted: Thu Nov 07, 2013 9:05 pm    Post subject: Dutch Master? Reply with quote

I eventually visited Ostend and Bruges three weeks ago and had a short visit to Sluice which was in the Netherlands. I enjoyed my visit despite the rain. I will return and spend more time in Bruges and perhaps Antwerp and visit some friends there I've know for around eight years, though they too have gone their own ways in the Music field! There was one Dutch Master I visited when I went to Amsterdam for a holiday, some years back. I had originally gone for the "Floriad" - which was absolutely brilliant! However I visited some pumping stations and dykes as well as visiting Vincent Van Gock's Gallery. Now he was a real Dutch Master and I truly appreciate his works. northumbrian1.
Back to top
View user's profile Send private message Send e-mail
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Hints and tips All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast