diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/.scripts/ssh.sh | 11 |
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 + |