aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts/ssh.sh
blob: 8bd75969d294f1fb5c007c476212e499f37d8496 (plain)
1
2
3
4
5
6
7
8
9
10
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