aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts
diff options
context:
space:
mode:
authorNeodarZ <neodarz@neodarz.net>2017-11-02 12:51:05 +0100
committerNeodarZ <neodarz@neodarz.net>2017-11-02 12:51:05 +0100
commitbab0535a283f89e968acc13571a9864b437832ff (patch)
tree28bbc5acd59e7aa77c6d4b83dcc9b657d6b5dfe4 /scripts/.scripts
parent2f2bea9a99b47988d9a002d90aa8266968371a66 (diff)
downloaddotfiles_ascii-bab0535a283f89e968acc13571a9864b437832ff.tar.xz
dotfiles_ascii-bab0535a283f89e968acc13571a9864b437832ff.zip
Add first version of ssh script activation/desactivation
Diffstat (limited to '')
-rwxr-xr-xscripts/.scripts/ssh.sh11
1 files changed, 11 insertions, 0 deletions
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
+