You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

9 lines
276 B

#/bin/bash
set -e
set -x
mkdir -p "$HOME/.ssh"
for f in *.pub; do (printf %s "$(< ${f})"; echo); done >> "$HOME/.ssh/authorized_keys"
cp "$HOME/.ssh/authorized_keys" "$HOME/.ssh/authorized_keys.bak"
sort "$HOME/.ssh/authorized_keys" | uniq | tee "$HOME/.ssh/authorized_keys"