2020-11-02 04:08:18 +00:00
|
|
|
#!/bin/sh
|
2020-10-29 06:23:39 +00:00
|
|
|
|
2020-11-21 18:07:26 +00:00
|
|
|
set -e
|
2020-11-08 16:26:14 +00:00
|
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
2020-11-02 04:08:18 +00:00
|
|
|
. "$DIR/../env.sh"
|
2020-10-29 06:23:39 +00:00
|
|
|
|
2020-11-21 18:07:26 +00:00
|
|
|
log 'Setting up ssh server'
|
|
|
|
|
2020-10-29 06:23:39 +00:00
|
|
|
# install sshd
|
|
|
|
case "$PM" in
|
|
|
|
apt)
|
|
|
|
sudo apt install \
|
|
|
|
openssh-server
|
|
|
|
;;
|
|
|
|
pacman)
|
2020-11-21 18:07:26 +00:00
|
|
|
sudo pacman -S --noconfirm --needed \
|
2020-10-29 06:23:39 +00:00
|
|
|
openssh
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
# start network
|
|
|
|
sudo systemctl enable ssh
|
|
|
|
sudo systemctl start ssh
|