Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 2:21 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun May 15, 2016 12:03 pm 
Offline

Joined: Sun May 15, 2016 11:33 am
Posts: 5
I created a 4096-bit gpg-key consisting of:
the master-key and 3 sub-keys for signing, decrypting, authenticating on a secure offline-PC.
From that key I exported just the 3 subkeys by:
Code:
gpg --export-secret-subkeys [key-ID] > subkeys

copied subkeys to one of my laptops, imported them into my keyring and on that laptop transferred the subkeys to my Yubikey4.
All works fine and I just have to plug in the Yubikey and enter the Yubikey-password to use my keys for decryptpting, signing and ssh-authentication - GREAT!

Now I want to use the same Yubikey with the same same gpg-keys on a second laptop.
I tried to just copy over the whole ~/.gnupg directory from laptop #1 to laptop #2, but gpg-agent reports "secret key not available". The Yubikey is recognised as I can check with
Code:
gpg2 --card-status


Seems there is some additional information missing - please help.

Kind regards,
x11


Last edited by x11 on Mon May 16, 2016 5:26 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Mon May 16, 2016 4:27 pm 
Offline

Joined: Sun May 15, 2016 11:33 am
Posts: 5
I just solved it.
Found this information here http://www.narf.ssji.net/~shtrom/wiki/t ... psmartcard
in the paragraph "Using the Card on Multiple Computers"
it suggestes:
Code:
$ gpg2 --card-edit
> fetch
> quit
$ gpg2 --card-status

and that worked fine for me.

In fact, the first part can be omitted, if you have the matching pubkey on your keyring. In that case a
Code:
gpg2 --card-status
is sufficient.
The essential thing is, you have to delete the whole secret key before, only then the stubs get rebuilt:
Code:
gpg2 --delete-secret-key <key-ID>

Regards,
x11


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group