#!/bin/sh
if [ "$1" = "" ]; then
   echo $1
   echo "must follow host ip"
   exit
fi

ssh-keygen -t rsa -P ""

scp /root/.ssh/id_rsa.pub root@$1:/root

ssh root@$1 "mkdir -p /root/.ssh; cat /root/id_rsa.pub>>/root/.ssh/authorized_keys"
ssh-add
