Skip to content

MacOS: ssh key agent persistance after reboot

Prerequisites for using ssh in a docker container: the ssh-agent must have a identity assigned - this can be checked with ssh-add -l and can be added to the agent with ssh-add

But this assignment ist not persistent between reboots, ssh-add has to be called each time after reboot for a successful use of ssh in a docker container.

Now, the idea is, to alter the prepareMac4L3d script and call ssh-add after the setup of the socat-container:

[...]
shell SOCATID=$(docker container ls --all -q -f name=l3d_socat)
if [[ -n ${SOCATID} ]]; then
  echo "All set!"
  # new line following:
  ssh-add 
  exit 0
fi
exit 1

I've tested this approach on my macbook and it works - what do you think?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information