JG-mirror/Ansible/SSH/readme.md

29 lines
395 B
Markdown
Raw Permalink Normal View History

2024-03-08 22:29:05 +00:00
# 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"
2024-03-08 22:29:05 +00:00
```
# 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
```