{% extends "base.html" %} {% block title %}SSH Setup - Server Monitoring{% endblock %} {% block page_title %}SSH Setup{% endblock %} {% block content %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %}
{{ message }}
{% endfor %} {% endif %} {% endwith %}
SSH Key Pair
{% if key_exists %}
SSH key exists at ~/.ssh/ansible_key
{% if public_key %}
Copy this key to ~/.ssh/authorized_keys on each device.
{% endif %} {% else %}
No SSH key found. Generate one below.
{% endif %}
SSH Authentication Settings

Configure SSH authentication for Ansible. Enable password mode to authenticate with a username/password instead of SSH keys.

Used when SSH key auth is not available on the target device.
When enabled, Ansible will connect to all devices using the password above. SSH key files will be ignored.
Test Password Authentication

Verify the password above works on a specific device before running the full key deployment. This connects with password-only auth (no SSH key) so you get an accurate pre-flight result.

Deploy SSH Keys to All Devices

Connects to every device using the password configured above and copies ~/.ssh/id_rsa.pub into each device's ~/.ssh/authorized_keys.

Run this once to bootstrap key-based auth. Afterwards, disable "Use password authentication" so all playbooks switch to SSH keys automatically.

{% if not settings.get('ssh_fallback_password') %}
Set the SSH Password first, then save settings.
{% endif %}
{% endblock %}