From 002401a9e7c3a16eea7fa9b2044bcaa2e2556279 Mon Sep 17 00:00:00 2001 From: James Turland Date: Fri, 8 Mar 2024 22:29:05 +0000 Subject: [PATCH] ansible episode 2 --- Ansible/SSH/readme.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Ansible/SSH/readme.md diff --git a/Ansible/SSH/readme.md b/Ansible/SSH/readme.md new file mode 100644 index 0000000..22d6725 --- /dev/null +++ b/Ansible/SSH/readme.md @@ -0,0 +1,28 @@ +# Edit Hosts File +``` +sudo nano /etc/ansible/hosts +``` + +# Fix SSH Key Permissions +``` +chmod 600 ~/.ssh/ansible +``` +# Ansible Ping Command +``` +ansible all -m ping +``` + +# Create SSH Key +``` +ssh keygen -t ed25519 -C "ansible" +``` + +# Copy SSH Key +``` +ssh-copy-id -i ~/.ssh/ansible.pub 192.168.200.50 +``` + +# Ansible Ping Command With New SSH Key +``` +ansible all -m ping --key-file ~/.ssh/ansible +``` \ No newline at end of file