mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5822: keep user-added sshkeys in authorized_keys
This commit is contained in:
parent
f948e96299
commit
64ef4fa958
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user