bootstrap/bootstrap

19 lines
573 B
Bash

#!/usr/bin/env bash
if sudo grep -q arch /etc/os-release; then
yes | sudo pacman -S openssh rsync
yes | sudo systemctl enable sshd.service
yes | sudo systemctl restart sshd.service
fi
if sudo grep -q opensuse /etc/os-release; then
sudo zypper -n in openssh-server rsync
sudo systemctl enable sshd.service
sudo systemctl start sshd.service
fi
[[ -d ~/.ssh/ ]] || mkdir ~/.ssh/ -m 700
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFhs7abkG7zWxkUG9hX7Ls+3KcdeqH9T6H6+Pvy+fDRS Ansible technical" >> ~/.ssh/authorized_keys
systemctl list-units | grep -i ssh