How to Enable Password Authentication in GCP or on any Virtual Machine?

Photo by Glenn Carstens-Peters on Unsplash

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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Neeraj Singh Negi
Neeraj Singh Negi

Written by Neeraj Singh Negi

AWS | Openstack | GCP | Ansible | Redhat 8 Linux | Docker | Jenkins | Kubernetes | Hadoop | Python | Machine Learning

No responses yet

Write a response