Skip to content

Instantly share code, notes, and snippets.

@Voronenko
Created September 2, 2016 20:17
Show Gist options
  • Save Voronenko/a8f2a9a2aa7d3ca47febaadac078311a to your computer and use it in GitHub Desktop.
Save Voronenko/a8f2a9a2aa7d3ca47febaadac078311a to your computer and use it in GitHub Desktop.
keyscans box by ip and adds to list of the known hosts
echo keyscan jump box
ssh-keyscan -t rsa,dsa $JUMP_BOX 2>&1 | sort -u - ~/.ssh/known_hosts > ~/.ssh/tmp_hosts
mv ~/.ssh/tmp_hosts ~/.ssh/known_hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment