Skip to content

Instantly share code, notes, and snippets.

@merura
Created April 1, 2024 10:09
Show Gist options
  • Select an option

  • Save merura/93b46e74dc8bfc24ed4bd4da97b72007 to your computer and use it in GitHub Desktop.

Select an option

Save merura/93b46e74dc8bfc24ed4bd4da97b72007 to your computer and use it in GitHub Desktop.
ssh-agent shell
#!/usr/bin/env bash
trap 'echo "Killing ssh-agent" && eval "$(ssh-agent -k)"' EXIT
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
echo "Shell activated"
bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment