Initial commit

This commit is contained in:
2021-04-03 15:17:27 +03:00
commit 358880697e

14
sshukh.plugin.zsh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
output=$(ssh "$@")
if [ $? -eq 255 ];
then
host=$(cut -d'@' -f2 <<< $1)
while true; do
read -p "Update known_hosts? [y/n] " yn
case $yn in
[Yy]* ) ssh-keygen -R $host && ssh "$@"; break;;
[Nn]* ) exit;;
* ) echo "Please answer y or n.";;
esac
done
fi