How to Enable Password Authentication in GCP or on any Virtual Machine?
Edit the file 60-cloudimg-settings.conf
Existing file looks like.
/etc/ssh/sshd_config.d/60-cloudimg-settings.conf
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
# Google Compute Engine times out connections after 10 minutes of inactivity.
# Keep alive ssh connections by sending a packet every 2 minutes.
ClientAliveInterval 120
# Prevent reverse DNS lookups.
UseDNS no
root@prod-ffmpeg-service:/etc/ssh/sshd_config.d# cat 60-cloudimg-settings.conf
PasswordAuthentication no
Changes required
PasswordAuthentication yes
Restart the sshd service.
sudo systemctl restart sshd