Jonathan Hart
Committed by Gerrit Code Review

Restrict the key file permissions as required by some OSes

Change-Id: I1774c8e50a8cabc7d4ac8046ed1325160b5fc0c3
...@@ -11,8 +11,10 @@ remote=$ONOS_USER@${1:-$OCI} ...@@ -11,8 +11,10 @@ remote=$ONOS_USER@${1:-$OCI}
11 scp -q ~/.ssh/id_rsa.pub $remote:/tmp 11 scp -q ~/.ssh/id_rsa.pub $remote:/tmp
12 ssh $remote " 12 ssh $remote "
13 mkdir -p ~/.ssh 13 mkdir -p ~/.ssh
14 + chmod 700 ~/.ssh
14 cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys 15 cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys
15 sort -u ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.bak 16 sort -u ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.bak
16 mv ~/.ssh/authorized_keys.bak ~/.ssh/authorized_keys 17 mv ~/.ssh/authorized_keys.bak ~/.ssh/authorized_keys
18 + chmod 600 ~/.ssh/authorized_keys
17 " 19 "
18 ssh -n -o PasswordAuthentication=no $remote true 20 ssh -n -o PasswordAuthentication=no $remote true
......