Skip to content

Instantly share code, notes, and snippets.

@drscream
Created September 12, 2017 06:13
Show Gist options
  • Select an option

  • Save drscream/d29b284b4f34ce5b93a20773fa233ea4 to your computer and use it in GitHub Desktop.

Select an option

Save drscream/d29b284b4f34ce5b93a20773fa233ea4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Set basedir and default config file
SSH_HOSTS='/var/ssh'
# Update mdata information from SSH host keys
for key in dsa_key dsa_key.pub rsa_key rsa_key.pub ecdsa_key ecdsa_key.pub ed25519_key ed25519_key.pub; do
cat ${SSH_HOSTS}/ssh_host_${key} |\
mdata-put ssh_host_${key}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment