Skip to content

Instantly share code, notes, and snippets.

@slumos
Created September 19, 2009 00:34
Show Gist options
  • Select an option

  • Save slumos/189368 to your computer and use it in GitHub Desktop.

Select an option

Save slumos/189368 to your computer and use it in GitHub Desktop.
fssh () {
hosts="$1 $(getent hosts $1)"
for h in ${=hosts}; do ssh-keygen -R $h; done
ssh-keyscan -tdsa,rsa ${=hosts} >> $HOME/.ssh/known_hosts
ssh $*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment