No description
Find a file
semantic-release-bot 4f0a09b78c chore(release): 1.10.0 [skip ci]
# [1.10.0](https://github.com/de-it-krachten/ansible-role-openssh/compare/v1.9.0...v1.10.0) (2026-03-15)

### Features

* Added support for Fedora 43 ([ad81ce9](ad81ce9773))
* Drop support for Fedora 41 ([8744a9f](8744a9ff15))
* Drop support for openSUSE Leap 15 ([707d2a5](707d2a5b6d))
* Drop support for SUSE Linux Enterprise 15 ([af30834](af308343ac))
2026-03-15 11:39:44 +00:00
.github/workflows Update CI 2026-03-14 19:48:49 +01:00
defaults fix: Update defaults to make them work 2024-12-18 20:38:13 +01:00
handlers feat: Move to FQCN 2022-10-09 21:33:10 +02:00
meta Update CI 2026-03-14 19:48:49 +01:00
molecule/default Update CI 2026-03-14 19:48:49 +01:00
tasks feat: Make it possible to insert settings at specific locations 2024-12-16 23:15:13 +01:00
.ansible-lint feat: Update CI to latest standards 2022-10-09 23:50:27 +02:00
.cicd Update CI 2026-03-06 22:56:34 +01:00
.cicd.overwrite Update CI 2026-03-14 19:48:49 +01:00
.collections feat: Add predefined set of KexAlgorithms 2024-02-10 12:01:52 +01:00
.gitignore feat: Update supported platforms & CI 2024-12-29 11:37:55 +01:00
.releaserc.yml Update CI 2026-03-06 22:56:34 +01:00
.roles feat: Update CI to latest standards 2022-10-09 23:50:27 +02:00
.yamllint fix: Update defaults to make them work 2024-12-18 20:38:13 +01:00
CHANGELOG.md chore(release): 1.10.0 [skip ci] 2026-03-15 11:39:44 +00:00
README.md Update CI 2026-03-14 19:48:49 +01:00

CI

ansible-role-openssh

Installs & manages OpenSSH

Dependencies

Roles

None

Collections

  • community.general

Platforms

Supported platforms

  • Red Hat Enterprise Linux 81
  • Red Hat Enterprise Linux 91
  • Red Hat Enterprise Linux 101
  • RockyLinux 8
  • RockyLinux 9
  • RockyLinux 10
  • OracleLinux 8
  • OracleLinux 9
  • OracleLinux 10
  • AlmaLinux 8
  • AlmaLinux 9
  • AlmaLinux 10
  • Debian 11 (Bullseye)
  • Debian 12 (Bookworm)
  • Debian 13 (Trixie)
  • Ubuntu 20.04 LTS
  • Ubuntu 22.04 LTS
  • Ubuntu 24.04 LTS
  • Fedora 42
  • Fedora 43

Note: 1 : no automated testing is performed on these platforms

Role Variables

defaults/main.yml


# OpenSSH service
openssh_service: sshd

# Default OpensSH port
openssh_port: 22

# SELinux type
openssh_setype: ssh_port_t

# dict of key/values to be configured
openssh_daemon_options:
  - key: Port
    value: "{{ openssh_port }}"
  - key: Ciphers
    value: 'aes128-ctr,aes192-ctr,aes256-ctr'
    insertafter: "# Ciphers"
  - key: KexAlgorithms
    value: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
    insertafter: "# Ciphers"
  - key: PermitRootLogin
    value: 'no'

# Use predefined host keys
openssh_host_keys: []
# openssh_host_keys:
#   - files/openssh/host1/ssh_host_dsa_key
#   - files/openssh/host1/ssh_host_dsa_key.pub
#   - files/openssh/host1/ssh_host_ecdsa_key
#   - files/openssh/host1/ssh_host_ecdsa_key.pub
#   - files/openssh/host1/ssh_host_ed25519_key
#   - files/openssh/host1/ssh_host_ed25519_key.pub
#   - files/openssh/host1/ssh_host_rsa_key
#   - files/openssh/host1/ssh_host_rsa_key.pub

defaults/family-Debian.yml


# list of packages
openssh_packages:
  - openssh-server
  - openssh-client

# ssh-server config file
opensshd_config: /etc/ssh/sshd_config

defaults/family-RedHat.yml


# list of packages
openssh_packages:
  - openssh
  - openssh-server
  - openssh-clients

# ssh-server config file
opensshd_config: /etc/ssh/sshd_config

defaults/family-Suse.yml


# list of packages
openssh_packages:
  - openssh
  - openssh-server
  - openssh-clients

# ssh-server config file
opensshd_config: /etc/ssh/sshd_config

defaults/Ubuntu-24.yml


# OpenSSH service
openssh_service: ssh

Example Playbook

molecule/default/converge.yml


- name: sample playbook for role 'openssh'
  hosts: all
  become: 'yes'
  vars:
    molecule_driver: '{{ lookup(''env'', ''MOLECULE_DRIVER_NAME'') }}'
    openssh_port: 2222
  tasks:
    - name: Include role 'openssh'
      ansible.builtin.include_role:
        name: openssh