Created
January 22, 2014 10:47
-
-
Save zvyn/8556769 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function ssh_no_memory() { | |
command ssh $* | |
echo -n "Remove " | |
tail -1 $HOME/.ssh/known_hosts | cut -d' ' -f1 | tr -d '\n' | |
echo " from known hosts?" | |
read yesno | |
case $yesno in | |
Y|y|Yes|yes|YES|Nagut|Jo|Jepp|Jadoch|klar) | |
sed -i '$ d' $HOME/.ssh/known_hosts | |
;; | |
esac | |
} | |
if [ ! $__NAME__ ]; then | |
__NAME__=$(basename --suffix=.bash $0) | |
if [[ $(type -t ${__NAME__}) == function ]]; then | |
${__NAME__} $0 $* | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment