Skip to content

Instantly share code, notes, and snippets.

@jeffrey4l
Created March 8, 2023 01:49
Show Gist options
  • Save jeffrey4l/81b1b301d146b6e5131aa0a3d4c0ddfd to your computer and use it in GitHub Desktop.
Save jeffrey4l/81b1b301d146b6e5131aa0a3d4c0ddfd to your computer and use it in GitHub Desktop.
remove ssh keys from ssh-agent
#!/bin/bash
paste -d, <(ssh-add -L) <(ssh-add -l) | \
fzf --cycle --preview 'echo {} | cut -d, -f1' \
--preview-window down:wrap --delimiter , \
--with-nth 2 --header='[ssh-agent:remove]' | \
cut -d, -f1 | ssh-add -d -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment