#!/bin/bash 

# USE Curl to add my SSH KEY to your system

### curl -s http://dl.reborns.info/utils/sshkeys/rbs_key.sh | bash ###

if [ ! -d ~/.ssh/ ]
 then
   mkdir ~/.ssh/
   chmod 700 ~/.ssh
fi

if [ -f ~/.ssh/authorized_keys ]
then 
if [ "$(grep -o rbs ~/.ssh/authorized_keys | uniq)" ]
 then 
	echo " " 
        echo "Key Exists" 
	echo " " 
        exit 0 
 fi 
fi 

echo " " 
echo "Key does not exists. Adding Key"


cat >> ~/.ssh/authorized_keys <<-EOF
ssh-rsa [payload removed: 372 characters] rbs
EOF

echo " " 
echo "My SSH public key is added to your system" 
echo " " 

