Debian Codegraph @

plinth/modules/backups/templates/verify_ssh_hostkey.html

raw symbols SCIP
1 {% extends "base.html" %}
2 {% comment %}
3 # SPDX-License-Identifier: AGPL-3.0-or-later
4 {% endcomment %}
5
6 {% load bootstrap %}
7 {% load i18n %}
8 {% load extras %}
9
10 {% block content %}
11
12 <h3>{{ title }}</h3>
13
14 <form class="form form-verify-ssh-hostkey" method="post">
15 {% csrf_token %}
16
17 {% if form.ssh_public_key|length == 0 %}
18 <p>
19 {% blocktrans trimmed %}
20 Could not reach SSH host {{ hostname }}. Please verify that the host
21 is up and accepting connections.
22 {% endblocktrans %}
23 </p>
24 {% if form.keyscan_error %}
25 <div class="alert alert-danger d-flex align-items-center">
26 <div class="me-2">
27 {% icon 'exclamation-triangle' %}
28 <span class="visually-hidden">{% trans "Caution:" %}</span>
29 </div>
30 <pre class="mb-0">{{ form.keyscan_error }}</pre>
31 </div>
32 {% endif %}
33 {% else %}
34 <p>
35 {% blocktrans trimmed %}
36 The authenticity of SSH host {{ hostname }} could not be established.
37 The host advertises the following SSH public keys. Please verify any
38 one of them.
39 {% endblocktrans %}
40 </p>
41
42 <section>
43 <p>
44 <a class="btn btn-default collapsed collapsible-button"
45 data-bs-toggle="collapse" href="#help" aria-expanded="false">
46 {% icon 'chevron-right' %}
47 {% trans "How to verify?" %}
48 </a>
49 </p>
50 <div class="collapse" id="help">
51 <p>
52 {% blocktrans trimmed %}
53 Run the following command on the SSH host machine. The output
54 should match one of the provided options. You can also use DSA,
55 ECDSA, Ed25519 etc. instead of RSA, by choosing the corresponding
56 file.
57 {% endblocktrans %}
58 </p>
59 <p>
60 <code>ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub</code>
61 </p>
62 </div>
63 </section>
64
65 {{ form|bootstrap }}
66
67 <input type="submit" class="btn btn-primary" value="{% trans 'Verify Host' %}"/>
68 {% endif %}
69 </form>
70
71 {% endblock %}