ssh working
This commit is contained in:
11
setup.sh
Normal file
11
setup.sh
Normal 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
|
||||
Reference in New Issue
Block a user