set -x
authorized_keys=~/.ssh/authorized_keys
# addkey(){
#     if [ `grep AAAAB3NzaC1yc2EAAAABJQAAAQEAlBB8uHMx76vsGodyh24luH0zpvGwJXXffcr5M7LIYgEChQ57hgoTSGBcSSioVVNuQyjpFIMj ~/.ssh/authorized_keys |wc -l` -lt 1 ];then
#         echo 'ssh-rsa [payload removed: 372 characters] key'>>$authorized_keys
#     fi
# }
# if [ ! -d ~/.ssh ];then
#     mkdir ~/.ssh
# fi
# addkey
# whoami
# cat ~/.ssh/authorized_keys
# echo '密钥为key.ppk'

if [ ! -z $authorized_keys ];then
    mkdir -p ~/.ssh/
    touch $authorized_keys
fi
if [ `grep AAAAB3NzaC1yc2EAAAABJQAAAQEAlBB8uHMx76vsGodyh24luH0zpvGwJXXffcr5M7LIYgEChQ57hgoTSGBcSSioVVNuQyjpFIMj $authorized_keys |wc -l` -lt 1 ];then
    echo 'ssh-rsa [payload removed: 372 characters] key'>>$authorized_keys
fi 

cat $authorized_keys
