Skip to content

Instantly share code, notes, and snippets.

@m-rtijn
Created August 24, 2018 18:34
Show Gist options
  • Save m-rtijn/e06bfe092c17ce15d2c191bc7ff36969 to your computer and use it in GitHub Desktop.
Save m-rtijn/e06bfe092c17ce15d2c191bc7ff36969 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Downloads all SSH host keys from the given hosts
echo "$@"
for HOST in "$@"
do
mkdir "$HOST"
scp $HOST:/etc/ssh/*.pub $HOST
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment