blob: a46964333492bdc6683e80112d7dc1be1bef5ab6 [file] [log] [blame]
tom2d7acb72014-09-22 22:13:00 -07001#!/bin/bash
2#-------------------------------------------------------------------------------
3# Pushes the local id_rsa.pub to the remote ONOS host authorized_keys.
4#-------------------------------------------------------------------------------
5
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7. $ONOS_ROOT/tools/build/envDefaults
8
9remote=$ONOS_USER@${1:-$OCI}
10
11scp -q ~/.ssh/id_rsa.pub $remote:/tmp
12ssh $remote "cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys"
13ssh -n -o PasswordAuthentication=no $remote true