mirror of
https://github.com/LamGC/quickly-conf-sshd.git
synced 2025-04-29 14:17:32 +00:00
fix: 修复 authorized_keys 保存后丢失换行符的问题.
This commit is contained in:
parent
c19ecc0d04
commit
3fc77a32ad
2
conf-sshd.sh
Normal file → Executable file
2
conf-sshd.sh
Normal file → Executable file
@ -79,7 +79,7 @@ update_sshkeys() {
|
||||
echo "-------------------- SSH Keys --------------------"
|
||||
echo "$ssh_keys"
|
||||
echo "--------------------------------------------------"
|
||||
echo $ssh_keys > ~/.ssh/authorized_keys
|
||||
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')"
|
||||
|
Loading…
Reference in New Issue
Block a user