A short bash script that pulls your public keys from github.com/UserName.keys
and adds them to the ssh authorized_keys
file of your current user.
This script can be run with or without arguments.
./updatekeys.sh
or ./updatekeys.sh username y
Adding your GitHub username and y will allow cause this script to run without prompting the user, making it suitable for crontab or startup scripts.
Script not running? Use
chmod +x ./updatekeys.sh
to give it executable permissions.
curl -fsSL https://raw.githubusercontent.com/alexwiench/Update-Authorized_Keys/master/updatekeys.sh -o updatekeys.sh
bash ./updatekeys.sh
You can also use your username as a command line arugment for automating or quick usage. Example:
./updatekeys.sh username
bash <(curl -fsSL https://raw.githubusercontent.com/alexwiench/Update-Authorized_Keys/master/updatekeys.sh) username
This script is only designed to modify the authorized_keys
file in the $HOME
directory of your current user and will abort if it detects sudo
.
Use su
to switch users if you must.