8 lines
333 B
Bash
8 lines
333 B
Bash
#!/bin/sh
|
|
|
|
# Get the default robot's hostname
|
|
robotHost=`jibo robot-list|grep '*'|awk '{print \$3 }'`;
|
|
|
|
echo "Adding ssh key to $robotHosts's ~/.ssh/authorized_keys file (WARNING, this will be added multiple times if repeatedly called)"
|
|
cat ~/.ssh/id_rsa.pub | ssh root@$robotHost "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
|