該当ユーザでログインして下記実行
$ ([ ! -e ~/.ssh ] && mkdir ~/.ssh && chmod 700 ~/.ssh ) ; \ cat <<EOF >>~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys ssh-rsa hogehogehoge hoge@hoge EOF
参考
http://www.unitrust.co.jp/bash-wrong-undarstanding-and-or-operator-conditional-statement/
めも