From 03070221be43e64ceeda53b14679d567f4382d0a Mon Sep 17 00:00:00 2001 From: waldek Date: Sat, 19 Mar 2022 11:04:22 +0100 Subject: [PATCH] fixes installation for ssh config --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 4f3c367..cc03bed 100755 --- a/install.sh +++ b/install.sh @@ -8,13 +8,14 @@ fi SCRIPT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)/" VIEWER="tmuxviewer" SSHD_CONFIG_FOLDER="/etc/ssh/sshd_config.d/" -CONFIG_FILE="$VIEWER.config" +CONFIG_FILE="$VIEWER.conf" CONFIG_FILE_PATH="$SSHD_CONFIG_FOLDER$CONFIG_FILE" BIN_FOLDER="/usr/bin/" VIEWER_BIN="tmux_viewer.sh" BROADCAST_BIN="tmux_broadcast.sh" function install_tmuxviewer () { + sudo apt install -y tmux openssh-server echo "adding $VIEWER_BIN and $BROADCAST_BIN to $BIN_FOLDER" sudo cp $SCRIPT_DIR$VIEWER_BIN $BIN_FOLDER$VIEWER_BIN sudo cp $SCRIPT_DIR$BROADCAST_BIN $BIN_FOLDER$BROADCAST_BIN @@ -23,7 +24,8 @@ function install_tmuxviewer () { echo "unsetting password for $VIEWER" sudo passwd -d $VIEWER 1> /dev/null sudo mkdir -p $SSHD_CONFIG_FOLDER - sudo echo "Match User $VIEWER\n\tPermitEmptyPassword yes" > $CONFIG_FILE_PATH + sudo echo -e "Match User $VIEWER\n\tPermitEmptyPasswords yes" > $CONFIG_FILE_PATH + sudo systemctl restart sshd.service } function uninstall_tmuxviewer () {