[GH-ISSUE #6234] Add local SSH Authorized store to new LXC #1340

Closed
opened 2026-02-26 12:48:33 +03:00 by kerem · 8 comments
Owner

Originally created by @Kaputtnique on GitHub (Jul 25, 2025).
Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/6234

🌟 Briefly describe the feature

add local ssh store to move to lxc which is created

📝 Detailed description

Heya,

is it possible to include ~.ssh/authorized_keys into the install scripts? like the ssh store of pve?
i know.. during install i can add ssh key.. but then i have to copy it before.. instead of this.. maybe a choice add local ssh keys or write sshkey down :D?

Greets and Thanks

💡 Why is this useful?

Because i have to add ssh key everytime i create a LXC. would be easier to add the local store to new lxc.. if wanted

Originally created by @Kaputtnique on GitHub (Jul 25, 2025). Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/6234 ### 🌟 Briefly describe the feature add local ssh store to move to lxc which is created ### 📝 Detailed description Heya, is it possible to include ~.ssh/authorized_keys into the install scripts? like the ssh store of pve? i know.. during install i can add ssh key.. but then i have to copy it before.. instead of this.. maybe a choice add local ssh keys or write sshkey down :D? Greets and Thanks ### 💡 Why is this useful? Because i have to add ssh key everytime i create a LXC. would be easier to add the local store to new lxc.. if wanted
Author
Owner

@MickLesk commented on GitHub (Jul 25, 2025):

is already? or do you mean local store and add this? Then not yet

if -n "${SSH_AUTHORIZED_KEY}" ; then
mkdir -p /root/.ssh
echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys
chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys
fi
}

<!-- gh-comment-id:3116984653 --> @MickLesk commented on GitHub (Jul 25, 2025): is already? or do you mean local store and add this? Then not yet if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then mkdir -p /root/.ssh echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys fi }
Author
Owner

@Kaputtnique commented on GitHub (Jul 25, 2025):

do we write about the same topic?

i mean .. the bash script has to perform on PVE Host Shell.. and at the shell is a existing authorized_keys store. which COULD added to the new created LXC.

like "do u want to add the ssh store of pve host to the new created LXC or add just 1 key like it is "

<!-- gh-comment-id:3117004563 --> @Kaputtnique commented on GitHub (Jul 25, 2025): do we write about the same topic? i mean .. the bash script has to perform on PVE Host Shell.. and at the shell is a existing authorized_keys store. which COULD added to the new created LXC. like "do u want to add the ssh store of pve host to the new created LXC or add just 1 key like it is "
Author
Owner

@MickLesk commented on GitHub (Jul 25, 2025):

hm, maybe as advanced setting can we try it. But i dont use this, where are the file stored in pve host?

<!-- gh-comment-id:3117014745 --> @MickLesk commented on GitHub (Jul 25, 2025): hm, maybe as advanced setting can we try it. But i dont use this, where are the file stored in pve host?
Author
Owner

@michelroegl-brunner commented on GitHub (Jul 25, 2025):

Here: /root/.ssh

He means just copy the ssh keys from the node to the lxc.

<!-- gh-comment-id:3117660451 --> @michelroegl-brunner commented on GitHub (Jul 25, 2025): Here: /root/.ssh He means just copy the ssh keys from the node to the lxc.
Author
Owner

@MickLesk commented on GitHub (Jul 25, 2025):

i know, we write in discord

<!-- gh-comment-id:3117689051 --> @MickLesk commented on GitHub (Jul 25, 2025): i know, we write in discord
Author
Owner

@MickLesk commented on GitHub (Sep 4, 2025):

Can you check it? Advanced Settings:

PRESET=ADVANCED bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
Image Image

maybe @michelroegl-brunner you too?

<!-- gh-comment-id:3253608995 --> @MickLesk commented on GitHub (Sep 4, 2025): Can you check it? Advanced Settings: ```bash PRESET=ADVANCED bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)" ``` <img width="680" height="296" alt="Image" src="https://github.com/user-attachments/assets/d467fe22-0bd7-4e07-b589-489433052544" /> <img width="627" height="333" alt="Image" src="https://github.com/user-attachments/assets/e762604b-1647-4b7e-ba80-f3e288ff8e46" /> maybe @michelroegl-brunner you too?
Author
Owner

@Kaputtnique commented on GitHub (Sep 4, 2025):

wonderful, idunno whats wrong during the setup, because it asked me for VAAPI Driver.. but i dont need any in this lxc xD

But the implemenation is good. :-D it worked for me well

<!-- gh-comment-id:3253653159 --> @Kaputtnique commented on GitHub (Sep 4, 2025): wonderful, idunno whats wrong during the setup, because it asked me for VAAPI Driver.. but i dont need any in this lxc xD But the implemenation is good. :-D it worked for me well
Author
Owner

@MickLesk commented on GitHub (Sep 4, 2025):

its just the dev, there are many many new features ^^ okay, then at next big feature bump its implemented

<!-- gh-comment-id:3253682906 --> @MickLesk commented on GitHub (Sep 4, 2025): its just the dev, there are many many new features ^^ okay, then at next big feature bump its implemented
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#1340
No description provided.