Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_cli_config_gen): Set ssh authentication protocols and empty password #4436

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ interface Management1

### Management SSH

#### Authentication Settings

| Authentication protocols | Empty passwords |
| ------------------------ | --------------- |
| keyboard-interactive, password, public-key | permit |

#### IPv4 ACL

| IPv4 ACL | VRF |
Expand Down Expand Up @@ -75,8 +81,10 @@ management ssh
ip access-group ACL-SSH in
ip access-group ACL-SSH-VRF vrf mgt in
idle-timeout 15
authentication protocol keyboard-interactive password public-key
connection limit 50
connection per-host 10
authentication empty-passwords permit
client-alive interval 666
client-alive count-max 42
fips restrictions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ management ssh
ip access-group ACL-SSH in
ip access-group ACL-SSH-VRF vrf mgt in
idle-timeout 15
authentication protocol keyboard-interactive password public-key
connection limit 50
connection per-host 10
authentication empty-passwords permit
client-alive interval 666
client-alive count-max 42
fips restrictions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
management_ssh:
authentication:
empty_passwords: permit
protocols:
- keyboard-interactive
- password
- public-key
access_groups:
- name: ACL-SSH
- name: ACL-SSH-VRF
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
{% if management_ssh is arista.avd.defined %}

### Management SSH
{% if management_ssh.authentication is arista.avd.defined %}

#### Authentication Settings

| Authentication protocols | Empty passwords |
| ------------------------ | --------------- |
{% if management_ssh.authentication.protocols is arista.avd.defined %}
{% set protocols = management_ssh.authentication.protocols | join(", ") %}
{% else %}
{% set protocols = 'keyboard-interactive, public-key' %}
{% endif %}
{% set empty_passwords = management_ssh.authentication.empty_passwords | arista.avd.default('auto') %}
| {{ protocols }} | {{ empty_passwords }} |
{% endif %}
{% if management_ssh.access_groups is arista.avd.defined %}

#### IPv4 ACL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@ management ssh
{% if management_ssh.idle_timeout is arista.avd.defined %}
idle-timeout {{ management_ssh.idle_timeout }}
{% endif %}
{% if management_ssh.authentication.protocols is arista.avd.defined %}
authentication protocol {{ management_ssh.authentication.protocols | join(" ") }}
{% endif %}
{% if management_ssh.connection.limit is arista.avd.defined %}
connection limit {{ management_ssh.connection.limit }}
{% endif %}
{% if management_ssh.connection.per_host is arista.avd.defined %}
connection per-host {{ management_ssh.connection.per_host }}
{% endif %}
{% if management_ssh.authentication.empty_passwords is arista.avd.defined %}
authentication empty-passwords {{ management_ssh.authentication.empty_passwords }}
{% endif %}
{% if management_ssh.client_alive.interval is arista.avd.defined %}
client-alive interval {{ management_ssh.client_alive.interval }}
{% endif %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ keys:
management_ssh:
type: dict
keys:
authentication:
type: dict
keys:
empty_passwords:
type: str
valid_values: ["auto", "deny", "permit"]
description: Permit or deny empty passwords for SSH authentication.
protocols:
type: list
items:
type: str
valid_values: ["keyboard-interactive", "password", "public-key"]
description: Allowed SSH authentication methods.
access_groups:
type: list
items:
Expand Down
Loading