{% extends "base.html" %} {% set editing = server_id is not none %} {% block title %}{{ "Edit Server" if editing else "Add Server" }}{% endblock %} {% block heading %}{{ "Edit Server" if editing else "Add Server" }}{% endblock %} {% block content %}
{% if errors %} {% endif %} {% if clone_source %}
Cloning {{ clone_source.name }}: enter this server's own name, IP address, PEM file and instance ID. Everything else is copied; saving creates a new server and leaves {{ clone_source.name }} unchanged.
{% endif %}
{% if clone_source %}{% endif %}
Must be unique. Used to match servers in CVE reports.
{% if errors.name %}
{{ errors.name }}
{% endif %}
{% if errors.ip_address %}
{{ errors.ip_address }}
{% endif %}
{% set method = form.auth_method or "pem" %}
{% if errors.auth_method %}
{{ errors.auth_method }}
{% endif %}
Path to the private key on this machine. Only the path is stored.
{% if errors.pem_path %}
{{ errors.pem_path }}
{% endif %}
{# Never pre-filled: the stored password is never sent back to the browser. #} {% if errors.ssh_password %}
{{ errors.ssh_password }}
{% endif %} {% if stored_password_error %}
{{ stored_password_error }}
{% endif %}
{% if has_stored_password and clone_source %}Password stored Stored credential of {{ clone_source.name }}: leave empty to use it for this server too. {% elif has_stored_password %}Password stored Leave empty to keep the stored password. {% endif %}Stored encrypted per server; never shown, logged or put on a command line. Requires sshpass on this machine. sudo on the server must still be passwordless.
Login user for every SSH/SCP connection to this server (default ubuntu; e.g. ec2-user on Amazon Linux).
{% if errors.ssh_user %}
{{ errors.ssh_user }}
{% endif %}
{% from "_aws_dropdown.html" import aws_dropdown %} {% set defaults = connection_defaults() %} {% set aws = aws_profiles() %}
Only how SSH and SCP reach the server. The login type above works the same over both.
{% if errors.connection_type %}
{{ errors.connection_type }}
{% endif %}
{% if clone_source %}
Required for a cloned server: the ID of the new instance.
{% else %}
Empty: found by private IP (from a name like ip-10-0-0-1, else the IP address above) and cached. A value here always wins.{% if connection and connection.instance_source == "resolved" %} Currently resolved: {{ connection.instance_id }}.{% endif %}
{% endif %} {% if errors.instance_id_override %}
{{ errors.instance_id_override }}
{% endif %}
{{ aws_dropdown("profile", "aws_profile", "aws_profile", aws_dropdown_view(form.aws_profile, aws.profiles, "aws_profile" in (form.other_chosen or [])), "Default from Settings", 128, defaults.profile or "example") }}
Default from Settings{% if defaults.profile %} ({{ defaults.profile }}){% endif %} unless you choose one. The list comes from your AWS CLI config.{% if aws.reason %} {{ aws.reason }} Use Other… to type a name.{% endif %}
{% if errors.aws_profile %}
{{ errors.aws_profile }}
{% endif %}
{{ aws_dropdown("region", "aws_region", "aws_region", aws_dropdown_view(form.aws_region, aws_regions, "aws_region" in (form.other_chosen or [])), "Default from Settings", 32, defaults.region or "us-east-1") }}
Default from Settings{% if defaults.region %} ({{ defaults.region }}){% endif %} unless you choose one. Choosing a profile selects its region from the AWS CLI config, if it has one. Other… must look like us-east-1.
{% if errors.aws_region %}
{{ errors.aws_region }}
{% endif %}
Tags (optional)
Free-form key/value labels, e.g. display_name = Billing API. Keys must be unique per server. Empty rows are ignored.
{% for tag in form.tags or [{"key": "", "value": ""}] %}
{% endfor %}
{% if errors.tags %}
{{ errors.tags }}
{% endif %}
{% if ssh_result %}{% include "_ssh_result.html" %}{% endif %}
Cancel
{% endblock %}