Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TECK

macrumors 65816
Original poster
Nov 18, 2011
1,120
473
I tried that on an Intel Mac Pro and well a M1 MacBook Pro running latest Ventura. For some reason, I cannot automatically add my ssh key to ssh-agent. My .ssh/config:
Code:
Host *
    AddKeysToAgent        yes
    IdentityFile          ~/.ssh/id_ed25519
    LogLevel              QUIET
    ServerAliveInterval   60
    StrictHostKeyChecking no
    TCPKeepAlive          yes
    UseKeychain           yes
    UserKnownHostsFile    /dev/null
AddKeysToAgent should add automatically the key to the agent, but for some reason, it does not. If I manually run the command, everything is fine, but once I reboot, the key is missing again. I know I could run a command in .bashrc but the idea is to use the standards, GitHub gives detailed instructions how to create the ed25519 key and add it to agent for Macs, but their guide does not work.

Thank you for your help.

Edit: I found the issue. ssh-agent is not running upon reboot, but as soon as you execute an ssh command from terminal, the agent will start and your key will be added automatically.
 
Last edited:
  • Like
Reactions: raman007 and sam008
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.