From e09ced5ef1c03e968df5451293024d120a55da26 Mon Sep 17 00:00:00 2001 From: mitchell Date: Fri, 1 Apr 2022 16:50:03 -0400 Subject: [PATCH] Add sshre function --- .config/fish/functions/sshre.fish | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .config/fish/functions/sshre.fish diff --git a/.config/fish/functions/sshre.fish b/.config/fish/functions/sshre.fish new file mode 100644 index 0000000..8a14add --- /dev/null +++ b/.config/fish/functions/sshre.fish @@ -0,0 +1,17 @@ +function sshre -d 'Remove list of hosts from ssh known_hosts' + alias ssh-rm 'ssh-keygen -f ~/.ssh/known_hosts -R' + set -l hosts kamino khetanna marauder malevolence pi.hole git + set -l domains lan m + + if test -n "$argv" + set hosts $argv + end + + for host in $hosts + ssh-rm $host + + for domain in $domains + ssh-rm $host.$domain + end + end +end