Brian O'Connor

Improving onos-push-keys to only require password once

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