ssh working

This commit is contained in:
bwr
2025-08-15 08:55:35 +00:00
parent 02aad24b0e
commit 2292e47e5c
13 changed files with 4249 additions and 15 deletions

11
setup.sh Normal file
View File

@@ -0,0 +1,11 @@
groupadd -g 850 ansible
useradd -r -c "Ansible User" -u 850 -g 850 -m -d /home/ansible ansible
echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible
chmod 440 /etc/sudoers.d/ansible
mkdir /home/ansible/.ssh
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKh5meb3eUPsXLNwQQvRLakPdQUtdQV4qL526VUE7BHt Ansible" > /home/ansible/.ssh/authorized_keys
chmod 700 /home/ansible/.ssh
chmod 600 /home/ansible/.ssh/authorized_keys
chown -R ansible: /home/ansible/.ssh