DevOps Classroom notes 27/Jul/2025

Ansible contd

Password less authentication between servers

  • Goal
    Preview
  • Steps:
    • create a user called as devops and provide sudo permissions to devops (two servers) sudo adduser devops
    • now create a ssh keypair ssh-keygen on node 1 and copy the public key to node2 ssh-copy-id
    • once we do this setup from node1 devops user can login into node2 ssh <node-2-ip>

AWS

  • Lets create two ubuntu ec2 instances.
  • In AWS we have a default user for ubuntu images ubuntu
  • AWS EC2 instances will have password based access disabled.
  • Lets enable password access and then perform above steps
    • Modify /etc/ssh/sshd_config.d/60-cloudimg-settings.conf using nano and set password authentication to yes
    • reload daemon & restart sshd
      bash
      sudo systemctl daemon-reload
      sudo systemctl restart ssh
  • Now give full permissions to the devops user sudo visudo and enter the following
devops   ALL=(ALL:ALL) NOPASSWD:ALL

Azure

  • Azure allows to set password while creating vms
  • Lets create two vms in azure and while creating lets set the devops user

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube