3 echo 'Copying ssh keys to devices'
5 sshopts
=(-o CheckHostIP
=no
-o StrictHostKeyChecking
=no
-o NoHostAuthenticationForLocalhost
=yes -o UserKnownHostsFile
=/dev
/null
)
7 locations
=(`mobdev list | awk '/UDID/ { gsub(/^(.*location ID = )+|(,.*)+$/, ""); print}'`)
11 mkdir -p /var
/tmp
/roothome
/.ssh
/
12 cat ~
/.ssh
/id_
*.pub
> /var
/tmp
/roothome
/.ssh
/authorized_keys
14 for location
in $locations
16 echo 'Copying to location '"$location"
18 tcprelay
--portoffset $port_offset --locationid $location ssh --quiet &
20 (( sshport
= $port_offset + 22 ))
22 echo "Copying file to device (via port $sshport)"
23 scp
-r -P $sshport $sshopts /var
/tmp
/roothome
/.
ssh root@localhost
:/var
/root
/