Created
March 8, 2023 01:49
-
-
Save jeffrey4l/81b1b301d146b6e5131aa0a3d4c0ddfd to your computer and use it in GitHub Desktop.
remove ssh keys from ssh-agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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