summaryrefslogtreecommitdiff
path: root/templates/service/ssh/node.def
blob: 55f94551b62be80631fc447d075b2764e3182381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
priority: 500 # After syslog and logins
help: Secure SHell (SSH) protocol
delete:sudo /usr/sbin/invoke-rc.d ssh stop 
       sudo sh -c "echo 'SSHD_OPTS=' > /etc/default/ssh"
end: if [ -z "$VAR(port/@)" ]; then exit 0; fi;
     case $VAR(protocol-version/@) in
     v2) VER=2;;
     v1) VER=1;;
     all) VER="1,2";;
      *) VER=2;;
     esac;
     STR="SSHD_OPTS=\"-p $VAR(port/@) -o Protocol=${VER}\""
     sudo sh -c "echo '$STR' > /etc/default/ssh"
     sudo /usr/sbin/invoke-rc.d ssh restart