14 lines
246 B
Bash
14 lines
246 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
if [ $# -lt 2 ]; then
|
||
|
echo "$0 server keyname [keyname...]"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
server=$1; shift
|
||
|
|
||
|
for keyname in "$@"; do
|
||
|
url=https://key.wf/${keyname}
|
||
|
ssh root@$server "curl -Ls $url >> ~/.ssh/authorized_keys" < /dev/null
|
||
|
done
|