How to enable SSH access using a GPG key for?

How to enable SSH access using a GPG key for?

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.

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 share SSH public key with remote host?

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.

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 does export GPG _ TTY mean in zshrc?

TTY is a special parameter set by Zsh very early during initialization. It gives you access to the terminal even when stdin might be redirected. I solved it so, just sharing it with others. I moved the export GPG_TTY=$ (tty) to top.

How to set the Max cache TTL for SSH?

The default is 600 seconds. Each time a cache entry is accessed, the entry’s timer is reset. To set an entry’s maximum lifetime, use max-cache-ttl . Set the time a cache entry used for SSH keys is valid to n seconds. The default is 1800 seconds. Each time a cache entry is accessed, the entry’s timer is reset.