1 2 3 4 5 6
#!/bin/bash ssh-keygen -f ~/.ssh/known_hosts -R $1 ssh-keyscan -H $1 >> ~/.ssh/known_hosts