fixes installation for ssh config
This commit is contained in:
parent
38d562697d
commit
03070221be
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue