From the course: Red Hat Certified Engineer (EX294) Cert Prep: 1 Foundations of Ansible

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Prepare managed nodes

Prepare managed nodes

From the course: Red Hat Certified Engineer (EX294) Cert Prep: 1 Foundations of Ansible

Start my 1-month free trial

Prepare managed nodes

- [Instructor] Before we can manage rhhost2, we need to prepare it. Be sure to have both rhhost1 and rhhost2 up and running. We'll start by making SSH keys on rhhost1. In a terminal, as your normal user, create SSH keys by typing, ssh-keygen, and hit Enter. This will generate a new RSA key pair. When it prompts you for a location to save the keys, just take the default and hit Enter. When it prompts you for a password, hit Enter, and when it prompts you again, hit Enter again. Now, list the ~/.ssh directory. Type in, ls ~/.ssh, and hit Enter. We see that we have two files in this directory now, id_rsa and id_rsa.pub. Now, we'll copy the public key to rhhost2 using the ssh-copy-id command. Type in clear, and then type in, ssh-copy-id, space, and then enter rhhost2's IP address. For me, it's 192.168.3.110, and hit Enter. When it asks to accept the fingerprint, type in yes, and hit Enter. And then, enter user1's…

Contents