Feature request: pre-set SSH keys

merlin-vrn

Member
Feb 10, 2020
14
0
21
41
When creating container there is an option to enter root password or upload SSH public keys. That is very useful; what is inconvenient is that one needs to find their keys each time.

What would be convenient if we had a way to set up "default" keys in advance in e.g. user profile, and then have an option to roll out the "default" keys during creation.

In principle it's possible to do with the password too (by storing and applying the hash in the same way), though I doubt it's secure enough.
 
Hello,

In the command line, you can use 'pct' with its appropriate option :
--ssh-public-keys <filepath>
Setup public SSH keys (one key per line, OpenSSH format).
( See : https://pve.proxmox.com/pve-docs/pct.1.html)
Then script it, so it applies with the same key each time you create a container.

At this point it may be handier to create a container template with all the options you wish (create a 'normal' user for instance, with appropriate password, (sudo-) rights and ssh keys) and spawn your container from that template.
Another option would be to write an ansible playbook for that purpose.

Kind regards,

GD
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!