Fedora 43 Git SSH · Feb 2026 · 5 min read

GitHub SSH Keys
on Fedora 43

Generate a proper ed25519 key, wire it into the ssh-agent, upload it to GitHub, and never type a password again. Done in under five minutes.

// start here
Step 01 —

Check for existing SSH keys

Before generating anything new, check if you already have a key pair sitting in ~/.ssh. If you see files like id_ed25519.pub or id_rsa.pub, you can skip straight to Step 3.

bash
ls -al ~/.ssh
◆ Info If the directory doesn't exist at all, that's fine — the keygen command in the next step will create it automatically.
Step 02 —

Generate a new ed25519 key

Use ed25519 — it's faster and more secure than the older RSA approach. Swap in the email address tied to your GitHub account.

bash
ssh-keygen -t ed25519 -C "you@example.com"

When prompted:

output
# Press Enter to accept the default location (~/.ssh/id_ed25519)
Enter file in which to save the key: 

# Add a passphrase (recommended) or press Enter to skip
Enter passphrase (empty for no passphrase): 
◆ Tip A passphrase protects your private key if your machine is ever compromised. You'll only need to type it once per session if you use ssh-agent (next step).
Step 03 —

Add the key to ssh-agent

The agent holds your key in memory so you don't re-enter the passphrase on every git push. Start it, then register the key.

bash
# Start the ssh-agent in the background
eval "$(ssh-agent -s)"

# Register your private key
ssh-add ~/.ssh/id_ed25519
◆ Persist across reboots On Fedora with systemd, you can also enable the user ssh-agent socket so it starts automatically: systemctl --user enable --now ssh-agent, then add export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" to your ~/.bashrc.
// github time
Step 04 —

Copy your public key

Print the public key to your terminal, then copy it to your clipboard. Only ever share the .pub file — the private key never leaves your machine.

bash
cat ~/.ssh/id_ed25519.pub

# Or pipe straight to clipboard with xclip / xsel
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard

If xclip isn't installed: sudo dnf install xclip -y

Step 05 —

Add the key to GitHub

Head to GitHub in your browser and navigate to:

url
github.com → Settings → SSH and GPG keys → New SSH key

Paste your public key into the Key field. Give it a recognisable title (e.g. fedora43-laptop). Leave the key type as Authentication Key, then click Add SSH key.

⚠ Warning Make sure there are no trailing newlines or extra whitespace when you paste. The key should start with ssh-ed25519 and end with your email.
Step 06 —

Test the connection

One command confirms everything is wired up correctly:

bash
ssh -T git@github.com

Expected output:

output
Hi username! You've successfully authenticated,
but GitHub does not provide shell access.

If you see that message, you're done. All git operations using SSH URLs will now authenticate silently.

◆ Switch existing repos to SSH Already cloned over HTTPS? Update the remote URL with:

git remote set-url origin git@github.com:USER/REPO.git
// optional extras
Bonus —

Configure ~/.ssh/config for multiple accounts

If you use multiple GitHub accounts (personal + work), create a config file to map different hostnames to different keys:

~/.ssh/config
# Personal account
Host github.com
  HostName     github.com
  User         git
  IdentityFile ~/.ssh/id_ed25519

# Work account
Host github-work
  HostName     github.com
  User         git
  IdentityFile ~/.ssh/id_ed25519_work

Then clone work repos with: git clone git@github-work:ORG/REPO.git

// tldr
TL;DR —

The whole thing in one block

bash — full setup
# 1. Generate key
ssh-keygen -t ed25519 -C "you@example.com"

# 2. Start agent + add key
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

# 3. Copy public key (install xclip first if needed)
sudo dnf install xclip -y
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard

# 4. Paste into github.com → Settings → SSH keys

# 5. Test
ssh -T git@github.com