{"id":19402398,"url":"https://github.com/robertdebock/ansible-role-openssh","last_synced_at":"2025-10-13T15:37:49.563Z","repository":{"id":41304746,"uuid":"154609121","full_name":"robertdebock/ansible-role-openssh","owner":"robertdebock","description":"Install and configure openssh on your system.","archived":false,"fork":false,"pushed_at":"2025-09-02T11:21:30.000Z","size":312,"stargazers_count":11,"open_issues_count":2,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-29T14:56:29.972Z","etag":null,"topics":["ansible","molecule","openssh","playbook","security","system","tox"],"latest_commit_sha":null,"homepage":"https://robertdebock.nl/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertdebock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"robertdebock"}},"created_at":"2018-10-25T04:15:37.000Z","updated_at":"2025-09-02T11:21:33.000Z","dependencies_parsed_at":"2023-02-15T07:32:00.210Z","dependency_job_id":"9b4148d6-dad5-4916-bc51-8c5be2b4254a","html_url":"https://github.com/robertdebock/ansible-role-openssh","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/robertdebock/ansible-role-openssh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-openssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-openssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-openssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-openssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertdebock","download_url":"https://codeload.github.com/robertdebock/ansible-role-openssh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-openssh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015931,"owners_count":26085777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","molecule","openssh","playbook","security","system","tox"],"created_at":"2024-11-10T11:23:30.360Z","updated_at":"2025-10-13T15:37:49.548Z","avatar_url":"https://github.com/robertdebock.png","language":"Jinja","funding_links":["https://github.com/sponsors/robertdebock"],"categories":[],"sub_categories":[],"readme":"# [Ansible role openssh](#openssh)\n\nInstall and configure openssh on your system.\n\n|GitHub|GitLab|Downloads|Version|\n|------|------|---------|-------|\n|[![github](https://github.com/robertdebock/ansible-role-openssh/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-openssh/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-openssh/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-openssh)|[![downloads](https://img.shields.io/ansible/role/d/robertdebock/openssh)](https://galaxy.ansible.com/robertdebock/openssh)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-openssh.svg)](https://github.com/robertdebock/ansible-role-openssh/releases/)|\n\n## [Example Playbook](#example-playbook)\n\nThis example is taken from [`molecule/default/converge.yml`](https://github.com/robertdebock/ansible-role-openssh/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.\n\n```yaml\n---\n- name: Converge\n  hosts: all\n  become: true\n  gather_facts: true\n\n  roles:\n    - role: robertdebock.openssh\n      openssh_allow_users:\n        - root\n      openssh_allow_groups:\n        - root\n```\n\nThe machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-openssh/blob/master/molecule/default/prepare.yml):\n\n```yaml\n---\n- name: Prepare\n  hosts: all\n  become: true\n  gather_facts: false\n\n  roles:\n    - role: robertdebock.bootstrap\n    - role: robertdebock.selinux\n```\n\nAlso see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.\n\n## [Role Variables](#role-variables)\n\nThe default values for the variables are set in [`defaults/main.yml`](https://github.com/robertdebock/ansible-role-openssh/blob/master/defaults/main.yml):\n\n```yaml\n---\n# defaults file for openssh\n\n# The tcp port ssh should listen on.\nopenssh_port: 22\n\nopenssh_address_family: any\n\nopenssh_listen_addresses:\n  - \"0.0.0.0\"\n  - \"::\"\n\nopenssh_host_keys:\n  - /etc/ssh/ssh_host_rsa_key\n  - /etc/ssh/ssh_host_ecdsa_key\n  - /etc/ssh/ssh_host_ed25519_key\n\nopenssh_rekey_limit: default none\n\nopenssh_syslog_facility: AUTH\n\nopenssh_loglevel: INFO\n\nopenssh_login_grace_time: 2m\nopenssh_permit_root_login: \"yes\"\nopenssh_strict_modes: \"yes\"\nopenssh_max_auth_tries: 6\nopenssh_max_sessions: 10\n\nopenssh_pub_key_authentication: \"yes\"\n\nopenssh_authorized_key_file: \".ssh/authorized_keys\"\n\nopenssh_authorized_prinicpals_file: none\nopenssh_authorized_keys_command: none\nopenssh_authorized_keys_command_user: nobody\n\nopenssh_host_based_authentication: \"no\"\nopenssh_ignore_user_known_hosts: \"no\"\nopenssh_ignore_rhosts: \"yes\"\n\nopenssh_permit_empty_passwords: \"no\"\nopenssh_password_authentication: \"yes\"\n\nopenssh_challenge_response_authentication: \"no\"\n\nopenssh_gssapi_authentication: \"yes\"\nopenssh_gssapi_cleanup_credentials: \"no\"\nopenssh_gssapi_strict_acceptor_check: \"yes\"\nopenssh_gssapi_key_exchange: \"no\"\nopenssh_gssaip_enable_k5_users: \"no\"\n\nopenssh_use_pam: \"yes\"\n\nopenssh_allow_agent_forwarding: \"yes\"\nopenssh_allow_tcp_forwarding: \"yes\"\nopenssh_gateway_ports: \"no\"\nopenssh_x11_forwarding: \"yes\"\nopenssh_x11_display_offset: 10\nopenssh_x11_use_localhost: \"yes\"\nopenssh_permit_tty: \"yes\"\n\nopenssh_print_motd: \"no\"\n\nopenssh_print_last_log: \"yes\"\nopenssh_tcp_keep_alive: \"yes\"\nopenssh_permit_user_environment: \"no\"\nopenssh_compression: delayed\nopenssh_client_alive_interval: 30\nopenssh_client_alive_count_max: 3\nopenssh_show_patch_level: \"no\"\nopenssh_use_dns: \"no\"\nopenssh_pid_file: /var/run/sshd.pid\nopenssh_max_startups: \"10:30:100\"\nopenssh_permit_tunnel: \"no\"\nopenssh_chroot_directory: none\nopenssh_version_addendum: none\n\nopenssh_banner: none\n\nopenssh_accept_envs:\n  - LANG\n  - LANGUAGE\n  - LC_ADDRESS\n  - LC_ALL\n  - LC_COLLATE\n  - LC_CTYPE\n  - LC_IDENTIFICATION\n  - LC_MEASUREMENT\n  - LC_MESSAGES\n  - LC_MONETARY\n  - LC_NAME\n  - LC_NUMERIC\n  - LC_PAPER\n  - LC_TELEPHONE\n  - LC_TIME\n  - XMODIFIERS\n\nopenssh_subsystem: sftp {{ openssh_sftp_server }}\n\n# Specifies a file containing public keys of certificate authorities that are\n# trusted to sign user certificates for authentication, or none to not use one.\nopenssh_trusted_user_ca_keys: none\n\n# Restrict access to this (space separated list) of users or groups.\n# For example: \"openssh_allow_users: root my_user\"\n# openssh_allow_users:\n#  - root\n\n# openssh_allow_groups:\n#  - wheel\n```\n\n## [Requirements](#requirements)\n\n- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-openssh/blob/master/requirements.txt).\n\n## [State of used roles](#state-of-used-roles)\n\nThe following roles are used to prepare a system. You can prepare your system in another way.\n\n| Requirement | GitHub | GitLab |\n|-------------|--------|--------|\n|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)|\n|[robertdebock.selinux](https://galaxy.ansible.com/robertdebock/selinux)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-selinux/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-selinux/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-selinux/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-selinux)|\n\n## [Context](#context)\n\nThis role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.\n\nHere is an overview of related roles:\n![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-openssh/png/requirements.png \"Dependencies\")\n\n## [Compatibility](#compatibility)\n\nThis role has been tested on these [container images](https://hub.docker.com/u/robertdebock):\n\n|container|tags|\n|---------|----|\n|[Alpine](https://hub.docker.com/r/robertdebock/alpine)|all|\n|[Amazon](https://hub.docker.com/r/robertdebock/amazonlinux)|Candidate|\n|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9|\n|[Debian](https://hub.docker.com/r/robertdebock/debian)|all|\n|[Fedora](https://hub.docker.com/r/robertdebock/fedora)|all|\n|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all|\n\nThe minimum version of Ansible required is 2.12, tests have been done to:\n\n- The previous version.\n- The current version.\n- The development version.\n\nIf you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-openssh/issues).\n\n## [License](#license)\n\n[Apache-2.0](https://github.com/robertdebock/ansible-role-openssh/blob/master/LICENSE).\n\n## [Author Information](#author-information)\n\n[robertdebock](https://robertdebock.nl/)\n\nPlease consider [sponsoring me](https://github.com/sponsors/robertdebock).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-openssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertdebock%2Fansible-role-openssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-openssh/lists"}