输出 SSH keys.

This commit is contained in:
LamGC 2023-01-28 15:54:45 +08:00
parent 728f4a99be
commit 4eb3738352
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -84,7 +84,10 @@ update_sshkeys() {
echo "Failed to download SSH public key at $(date '+%Y-%m-%d %H:%M:%S')"
exit 1
fi
curl -s $sshkey_url > ~/.ssh/authorized_keys || (echo "Failed to download SSH public key." && exit 1)
echo "-------------------- SSH Keys --------------------"
echo "$ssh_keys"
echo "--------------------------------------------------"
echo $ssh_keys > ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
# 输出更新成功,需要附带时间日期
echo "SSH public key updated successfully at $(date '+%Y-%m-%d %H:%M:%S')"