mirror of
https://github.com/JamesTurland/JimsGarage.git
synced 2024-11-21 23:40:19 +00:00
ansible episode 2
This commit is contained in:
parent
9e6520b351
commit
002401a9e7
1 changed files with 28 additions and 0 deletions
28
Ansible/SSH/readme.md
Normal file
28
Ansible/SSH/readme.md
Normal file
|
@ -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
|
||||
```
|
Loading…
Reference in a new issue