View both keys with gpg –list-keys
$ gpg –list-keys
pub 1024D/AAAAAAAA 2008-03-07
uid test fwknop
sub 2048g/DDDDDDDD 2008-03-07
Export both keys from remote and local terminals.
gpg -a --export AAAAAAAA > remote.asc
gpg -a --export BBBBBBBB > local.asc
where AAAAAAAA is the remote key id and BBBBBBBB is the local key id.
securely transfer remote.asc to local terminal.
securely transfer local.asc to remote terminal.
import and signed both keys, you will need to enter the correct passphrase when signing both keys.
on local terminal
$ gpg --import remote.asc
$ gpg --edit-key AAAAAAAA
Command> sign
Command> save
on remote terminal
$ gpg --import local.asc
$ gpg --edit-key BBBBBBBB
Command> sign
Command> save
