Contents
- 1 How to enable the GPG subkey when using SSH?
- 2 When to use a GPG key for encryption?
- 3 How does an OpenPGP client decrypt a block?
- 4 What’s the difference between OpenSSH, ssh agent and GPG?
- 5 How to fix no secret key in GPG?
- 6 What happens if there are no keyids in GPG?
- 7 How are SSH and PGP private keys used?
- 8 How to share SSH public key with remote host?
How to enable the GPG subkey when using SSH?
Enable the GPG subkey When you use SSH, a program called ssh-agent is used to manage the keys. To use a GPG key, you’ll use a similar program, gpg-agent, that manages GPG keys. To get gpg-agent to handle requests from SSH, you need to enable support by adding the line enable-ssh-support to the ~/.gnupg/gpg-agent.conf.
When to use a GPG key for encryption?
The suggested usage of GPG is to create a subkey for encryption. This subkey is a separate key that, for all intents and purposes, is signed by your primary key and transmitted at the same time. This practice allows you to revoke the encryption subkey on its own, such as if it becomes compromised, while keeping your primary key valid.
What kind of RSA key do I need for SSH?
SSH typically uses a 2048-bit RSA key that does not expire (type 8 in the options below). Below is an edited version of the workflow. This and all other commands were tested on Fedora 29. RSA keys may be between 1024 and 4096 bits long. Please specify how long the key should be valid.
How to delete private part of GPG key?
Note however that since GnuPG 2.1, you can delete the private part of your master key by deleting the appropriate file (named by keygrip, which you can obtain using gpg -K –with-keygrip) in ~/.gnupg/private-keys-v1.dso you shouldn’t need to –export-secret-subkeysand re-import them.
How does an OpenPGP client decrypt a block?
Imagine your OpenPGP client (for example, GnuPG) sends a request “decrypt this cypher block” which then is performed by the card (the actual encryption is done using a block cypher which is much faster, and on the computer’s CPU), or “sign this user ID of this key”, which is again performed by the card.
What’s the difference between OpenSSH, ssh agent and GPG?
Just skip until What is GPG? (in there are two sub sections about “OpenSSH”, “SSH Agent” and “OpenSSL”, just skip those until you get to the next “GPG” section and continue all the way from there) This post isn’t meant to be “this is how you do security”. I’m not a security expert.
What is the difference between OpenSSL and GPG?
It is typically used to enable secure shell connections from your machine to external servers. OpenSSH has a different transport protocol compared to OpenSSL. Although OpenSSH does actually utilise OpenSSL for its cryptographic operations, such as key pair generation.
What does GPG-list-keys mean in PGP?
“gpg –list-keys” shows this automatically – 2048R means 2048 bit RSA, and 4096R means 4096 bit RSA. symmetric encryption (of files): This is up to a combination of your public key’s preferences and the capabilities of the gpg/pgp softare you use.
How to fix no secret key in GPG?
Simple fix is to import your secret key into gpg2. Now both gpg and gpg2 can read my secret key and all is well: This commit was signed with the committer’s verified signature . GPG key ID: 15B63ADCA0034B9E Learn about vigilant mode .
What happens if there are no keyids in GPG?
If no keyIDs are given, gpg does nothing. Take care: Keyservers are by design write only systems and thus it is not possible to ever delete keys once they have been send to a keyserver. Same as –export, but exports the secret keys instead. The exported keys are written to STDOUT or to the file given with option –output.
How to import a RSA SSH key into GPG as?
Just generate a new PGP key. If you want to, then make it RSA and of the same length as your SSH key. (No sane person is going to look much closer at it than verifying the fingerprint anyway.) Then distribute the public key to the people you wish to correspond with, as a PGP key.
What’s the difference between SSH and gpg agent?
When you attempt to SSH into the appropriate servers, you will be prompted to unlock your GPG key (it better have a password!), then gpg-agent will provide the authentication in place of ssh-agent. You have fewer files to keep securely backed up and your key management is a bit easier.
How are SSH and PGP private keys used?
Both PGP and SSH key pairs are long-term keys, which are used to secure ephemeral (message and session) symmetric keys, as well as verify authenticity of a remote party. That makes the PGP or SSH private key a much higher value target for an attacker than the corresponding symmetric key.
In order to use SSH, you need to share your public key with the remote host. You have two options. First, you can run ssh-add -L to list your public keys and copy it manually to the remote host. You can also use ssh-copy-id.
How to add a PGP key to gpg-agent?
When you are using the current stable GnuPG version (2.0.x) you can use monkeysphere to add your key to gpg-agent (again, after starting gpg-agent with the –enable-ssh-support option). It is also possible to use GNOME keyring (or even the regular ssh-agent) with the help of monkeysphere.
Can a PGP key be used as an SSH key?
I use a 4096 byte RSA PGP key; since SSH also uses the RSA standard, is it at all possible to use the PGP key as an SSH key without installing additional software on the server (and as little as possible on the client)? There are several ways, which may or may not work: