This script will populate the authorized_keys
file on a server with the entries in this repository. To run this script, use the following command (as root):
curl -s https://raw.githubusercontent.com/rax-brazil/pub-ssh-keys/master/rackerkeys.sh | bash
This script performs the following actions:
- Adds our
rack
management user. - Adds the
authorized_keys
file to that user's home directory. - Performs a checksum on this file.
- Adds a cron entry to update this file on a scheduled basis.
- Grants sudo permissions to the
rack
user.
To regenerate the checksum file before uploading, perform the following command:
md5sum authorized_keys > authorized_keys.md5sum
Install md5sha1sum
via homebrew before running the md5sum
command:
brew install md5sha1sum
md5sum authorized_keys > authorized_keys.md5sum
git clone git@github.com:<USERNAME>/pub-ssh-keys.git
git config core.autocrlf false
git reset --hard origin/master
md5sum authorized_keys > authorized_keys.md5sum