CLOUDSTACK-5822: keep user-added sshkeys in authorized_keys

This commit is contained in:
Wei Zhou 2015-11-06 14:28:14 +01:00
parent f948e96299
commit 64ef4fa958

View File

@ -81,8 +81,8 @@ if [ ! -e $authorized ]; then
chmod 600 $authorized
fi
cat $authorized|grep -v "$publickey"|tee $authorized > /dev/null
echo "$publickey" >> $authorized
sed -i "/ cloudstack@apache.org$/d" $authorized
echo "$publickey cloudstack@apache.org" >> $authorized
which restorecon && restorecon -R -v $sshdir