mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-05-17 09:10:25 +00:00
Enable SSH_KEY without password (#4523)
This commit is contained in:
parent
b021a2c139
commit
9359f6d883
@ -702,8 +702,14 @@ advanced_settings() {
|
|||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$PW" == -password* ]]; then
|
SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)"
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
|
||||||
|
if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||||
|
SSH_AUTHORIZED_KEY=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$PW" == -password* || -n "$SSH_AUTHORIZED_KEY" ]]; then
|
||||||
|
if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
||||||
SSH="yes"
|
SSH="yes"
|
||||||
else
|
else
|
||||||
SSH="no"
|
SSH="no"
|
||||||
@ -714,15 +720,7 @@ advanced_settings() {
|
|||||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${SSH}" == "yes" ]]; then
|
|
||||||
SSH_AUTHORIZED_KEY="$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)"
|
|
||||||
|
|
||||||
if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then
|
|
||||||
echo "Warning: No SSH key provided."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
SSH_AUTHORIZED_KEY=""
|
|
||||||
fi
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||||
VERB="yes"
|
VERB="yes"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user