Skip to content

After creation of machines, if want to create users and add sudoers

Deekshith SN edited this page Jun 19, 2021 · 3 revisions
  • useradd user_name
  • passwd user_name
  • after which open sudoers file add below line ( to open sudoers file vi /etc/sudoers )
user_name    ALL=(ALL:ALL) ALL
  • once that's done, by default cloud machines password authentication is disabled. so we need to enable and restart ssh service using below commands

vi /etc/ssh/sshd_config change PasswordAuthentication no to as shown below

PasswordAuthentication yes

  • systemctl restart sshd

  • gcloud container clusters resize cluster-1 --num-nodes=0 --zone us-central1-a --quiet