This commit is contained in:
MatMoul 2023-12-06 00:34:48 +01:00
parent 2c72645195
commit efbb2c0e0c

6
sshrm
View File

@ -4,9 +4,9 @@ declare -r FILENAME="${HOME}/.ssh/known_hosts"
declare HOST="" declare HOST=""
if [ ! "${1}" == "" ]; then if [ ! "${1}" == "" ]; then
case ${1} in case "${1}" in
*[!0-9]*) HOST=$(sed -n -e "${1}"p "${FILENAME}" | awk '{print $1}') ;; *[!0-9]*) HOST=${1} ;;
*) HOST=${1} ;; *) HOST=$(sed -n -e ${1}p "${FILENAME}" | awk '{print $1}') ;;
esac esac
ssh-keygen -R "${HOST}" ssh-keygen -R "${HOST}"
else else