projects
/
noc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ansible: merge master to vm-install branch
[noc.git]
/
ansible
/
remove-known-host.sh
diff --git
a/ansible/remove-known-host.sh
b/ansible/remove-known-host.sh
index
d2c8b8d
..
2c5fd7f
100755
(executable)
--- a/
ansible/remove-known-host.sh
+++ b/
ansible/remove-known-host.sh
@@
-5,11
+5,11
@@
if [ -z "$1" ]; then
exit 1
fi
exit 1
fi
-SHORT="$1"
-SSH_HOST=$(ssh -G "$1" | grep "^hostname " | awk '{ print($2) }' )
+SHORT="r3-${1%%.*}"
+SSH_HOST=$(ssh -G "$SHORT" | grep "^hostname " | awk '{ print($2) }' )
for name in $SHORT $SSH_HOST; do
for name in $SHORT $SSH_HOST; do
- ssh-keygen -f "$HOME/.ssh/known_hosts" -R "$name"
+ ssh-keygen -f "$HOME/.ssh/known_hosts" -R "[$name]:22000"
done
exit 0
done
exit 0