Skip to content

Commit

Permalink
Fix the SSH certificate access modified by PVE
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Jun 24, 2023
1 parent 03bdc90 commit 22a777f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,15 @@ EOF
software_install "ifupdown2"
software_update

# Adjust sshd_config (Fix the SSH certificate access modified by PVE)
[[ -L ~/.ssh/authorized_keys ]] && {
cp -f $(ls -l ~/.ssh/authorized_keys | awk '{print $NF}') ~/.ssh/authorized_keys_2
chmod 600 ~/.ssh/authorized_keys_2
sudo sed -i '/AuthorizedKeysFile/d' /etc/ssh/sshd_config
sudo echo "AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys_2" >>/etc/ssh/sshd_config
sudo /etc/init.d/ssh restart
}

sync && sleep 3
echo -e "${NOTE} The network address: [ https://${my_address}:8006 ]"
echo -e "${NOTE} Username and Password: [ Your system account ]"
Expand Down

0 comments on commit 22a777f

Please sign in to comment.