Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

ssh-keygen

Run the command ssh-keygen to interactively generate a new pair of public/private keys. It is strongly suggested that you protect your private keys with a passphrase. With the increasing using of AI agent/skills, the risk of leaking keys/tokens is much higher compared to before.

SSH agent

Follow the steps below to setup the ssh agent if you protect your SSH private keys with a passphrase.

  1. Upload your SSH public key to servers (e.g., GitHub) that you need to access via SSH.

  2. Run the following command to terminate previously created and persisted SSH tunnels (if any).

ssh -O exit git@github.com
  1. Run the following command (for fish).

eval (ssh-agent -c)

It’s the best to add the following script into your config.fish.

if not set -q SSH_AUTH_SOCK
eval (ssh-agent -c) > /dev/null
end
  1. Load the SSH private key you need into SSH agent.

ssh-add ~/.ssh/id_ed25519

Tips for SSH Config

  1. You can configure SSH to auto add keys to SSH agent .

  2. Persist SSH connections helps.