Hi
@muzammal , welcome to the forum.
Keeping in mind that your question is not PVE specific, are you using PVE built-in CI config? Custom config?
Are you changing the file manually after logging in with a key?
Are you able to login with password from the console? (qm terminal [vmid] )
In Ubuntu the SSH server service is called "ssh.service".
After you think you have applied the setting (manually?) and restarted the service, have you checked the running configuration of SSHD?
Code:
sshd -T|egrep -i pass
permitrootlogin without-password
kerberosorlocalpasswd yes
passwordauthentication no
permitemptypasswords no
I tried editing the sshd_config file to allow password-based login by making the following changes:
- Set PasswordAuthentication yes
You need to provide an exact line you changed. If you entered the line as shown above, that is an invalid syntax.
Also, keep in mind that Cloud Images may have primary configuration file:/etc/ssh/sshd_config
And secondary configuration file, that overwrites the primary: /etc/ssh/sshd_config.d/60-cloudimg-settings.conf
For example, in our image there is only one line that is custom:
Code:
cat /etc/ssh/sshd_config.d/60-cloudimg-settings.conf
PasswordAuthentication no
the drop-in files in /etc/ssh/sshd_config.d/ are applied in lexical (numeric/alphabetical) order after the main /etc/ssh/sshd_config. So you may want to add 99- file to overwrite the cloudimg one.
All that said, if you are using CUSTOM cloudinit, why not use native approach :
https://cloudinit.readthedocs.io/en/latest/reference/modules.html#set-passwords
Cheers
Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox