Enable Password Based Authentication in GCP Virtual Machine

  1. You can set password for existing user or create user and set password.

    • create user useradd user

    • create password passwd user

  2. Update configuration file /etc/ssh/ssh_config to enable password based authentication.

    PasswordAuthentication yes

PasswordAuthentication yes

  1. Restart the sshd service

    • systemctl restart sshd.service
0
Subscribe to my newsletter

Read articles from Neeraj Singh Negi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Neeraj Singh Negi
Neeraj Singh Negi