#!/bin/bash echo === $0 [ ! -d /root/.ssh ] && { mkdir /root/.ssh chmod 700 /root/.ssh } k=$(cat /etc/vdn/.ssh/id_rsa.pub) [ -n "$k" ] && { ! fgrep -q "$k" /root/.ssh/authorized_keys && echo "$k" >> /root/.ssh/authorized_keys }