cloud-init image without ssh-key

nbanik

New Member
Apr 22, 2024
24
2
3
Hello Experts,

How can I create cloud-init vm without ssh public key.

I want to use user/password instead of ssh key.

How can i achieve these?

Regards.
 
How can I create cloud-init vm without ssh public key.

I want to use user/password instead of ssh key.

How can i achieve these?
The obvious answer is to specify only a username and password. I have a suspicion that you tried it, and it didn't work for you? In that case, perhaps you can add more details to your questions:

- what template/image did you use
- where did you get it
- what did you configure
- what was the result
- what if any additional troubleshooting did you do


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
The obvious answer is to specify only a username and password. I have a suspicion that you tried it, and it didn't work for you? In that case, perhaps you can add more details to your questions:

- what template/image did you use
- where did you get it
- what did you configure
- what was the result
- what if any additional troubleshooting did you do


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I tried specifying only user/pass. But I can not login.

I need to login with ssh private key.

Image I used:
https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
 
If you set everything up properly, then when you run:
qm terminal [VMID]
You will be able to login with your username and password.

After you are logged in, you can then examine the running VM and you will find:
Code:
cat /etc/ssh/sshd_config.d/60-cloudimg-settings.conf
PasswordAuthentication no

This is common to all modern cloud images produced by the vendors. If you want to change this, you will need to create a custom CloudInit, or modify the image, or create your own.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: nbanik
If you set everything up properly, then when you run:
qm terminal [VMID]
You will be able to login with your username and password.

After you are logged in, you can then examine the running VM and you will find:
Code:
cat /etc/ssh/sshd_config.d/60-cloudimg-settings.conf
PasswordAuthentication no

This is common to all modern cloud images produced by the vendors. If you want to change this, you will need to create a custom CloudInit, or modify the image, or create your own.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Thanks for the solution. It works perfectly.