Skip to content

Instantly share code, notes, and snippets.

@74th
Created April 28, 2017 22:28
Show Gist options
  • Save 74th/f35a67af6b5353a120f2a147c6b34103 to your computer and use it in GitHub Desktop.
Save 74th/f35a67af6b5353a120f2a147c6b34103 to your computer and use it in GitHub Desktop.
put-authorized_keys.sh
#!/bin/bash
set -Ceux
if [ $# -ne 1 ]; then
echo "put-authorized_keys.sh <HOSTNAME>"
exit 1
fi
ssh $1 mkdir .ssh/ \; true
scp ~/.ssh/id_rsa.pub $1:.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment