Add local SSH Authorized store to new LXC #1567

Open
opened 2025-11-20 05:12:33 -05:00 by saavagebueno · 8 comments
Owner

Originally created by @Kaputtnique on GitHub (Jul 25, 2025).

🌟 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). ### 🌟 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
saavagebueno added the Implemented in VED waiting push to Main label 2025-11-20 05:12:33 -05:00
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
}

@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 "

@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?

@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.

@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

@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?

@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

@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

@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.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#1567