ssh function to learn not to use -A

This commit is contained in:
Jonas Forsberg 2020-09-09 11:21:55 +02:00
parent b49b89a65d
commit 559cddb45a
No known key found for this signature in database
GPG Key ID: F2E9818C70350CC9

View File

@ -85,3 +85,19 @@ function ww(){
;; ;;
esac esac
} }
function ssh(){
for arg in "$@"
do
case "$arg" in
-A)
read -t 5 -n 1 -s -r -p "Consider to use -o ProxyJump instead! Press 'y' to continue with -A" answer
printf "\n"
if [[ "${answer,,}" != "y" ]]; then
return 1
fi
esac
done
/usr/bin/ssh "$@"
}