From bab0535a283f89e968acc13571a9864b437832ff Mon Sep 17 00:00:00 2001 From: NeodarZ Date: Thu, 2 Nov 2017 12:51:05 +0100 Subject: Add first version of ssh script activation/desactivation --- scripts/.scripts/ssh.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/.scripts/ssh.sh (limited to 'scripts/.scripts') diff --git a/scripts/.scripts/ssh.sh b/scripts/.scripts/ssh.sh new file mode 100755 index 0000000..8bd7596 --- /dev/null +++ b/scripts/.scripts/ssh.sh @@ -0,0 +1,11 @@ +#!/bin/sh +sudo + +if [[ $1 == "enable" ]]; then + sed -i -e 's/#ListenAddress ::\nListenAddress 127.0.0.1/#ListenAddress ::/g' /etc/ssh/sshd_config +elif [[ $1 == "disable" ]]; then + sed -i -e '/ListenAddress 127.0.0.1/d' /etc/ssh/sshd_config +fi + +sudo -k + -- cgit v1.2.1