From 7748235e2b9bc8c432feea6c11dd537902345bed Mon Sep 17 00:00:00 2001 From: Maxim Vershinin Date: Mon, 6 Jul 2026 14:47:31 +0000 Subject: [PATCH] FEATURE: hardened ssh client config added, task pushing it added --- roles/0_basic_postinstall/files/hardened_ssh.conf | 4 ++++ roles/0_basic_postinstall/tasks/harden_ssh.yaml | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 roles/0_basic_postinstall/files/hardened_ssh.conf diff --git a/roles/0_basic_postinstall/files/hardened_ssh.conf b/roles/0_basic_postinstall/files/hardened_ssh.conf new file mode 100644 index 0000000..012011c --- /dev/null +++ b/roles/0_basic_postinstall/files/hardened_ssh.conf @@ -0,0 +1,4 @@ + Host * + HashKnownHosts yes + GSSAPIAuthentication yes + KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,curve25519-sha256 \ No newline at end of file diff --git a/roles/0_basic_postinstall/tasks/harden_ssh.yaml b/roles/0_basic_postinstall/tasks/harden_ssh.yaml index c326da2..0938667 100644 --- a/roles/0_basic_postinstall/tasks/harden_ssh.yaml +++ b/roles/0_basic_postinstall/tasks/harden_ssh.yaml @@ -8,8 +8,8 @@ notify: restart sshd -#- name: Configure ssh client -# copy: -# src: /home/max/ansible_files/ssh_config -# dest: /etc/ssh/ssh_config -# mode: u=rw,g=r,o=r \ No newline at end of file +- name: Configure ssh client + copy: + src: ../files/hardened_ssh.conf + dest: /etc/ssh/ssh_config.d/hardened_ssh.conf + mode: u=rw,g=r,o=r \ No newline at end of file