insurgent
view bin/insurgent.sh @ 1:aac5e8f4ce84
GNU Affero General Public License
| author | Binki <ohnobinki@ohnopublishing.net> |
|---|---|
| date | Sun, 13 Dec 2009 02:30:48 -0500 |
| parents | 771762915ac3 |
| children |
line source
1 #!/bin/bash
2 # Copyright 2009 Nathan Phillip Brink
3 #
4 # This file is a part of insurgent.
5 #
6 # insurgent is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # insurgent is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Affero General Public License for more details.
15 #
16 # You should have received a copy of the GNU Affero General Public License
17 # along with insurgent. If not, see <http://www.gnu.org/licenses/>.
19 # ssh cli-style userhost
21 # port forwardings
23 -R 16023:acolyte:22 -L 10443:linksys.cdm:443 -L 10025:localhost:25"
25 # a port that is forward from here to the remote host
26 # that we should be able to connect to if the tunnel is up
29 # the same for a remote-forwarded port:
32 # where the pidfile should be stored
35 ############
36 # local vars (don't edit beneath here):
38 # 1 if the ssh client needs to be restarted
49 else
52 # ^ aliveness of reverse tunnel (netcat's -z option is a wonderful thing...):
56 #kill the hanging ssh client
58 fi
59 fi
61 #TODO make this line more flexible to match ${PORTS} better
62 if ! ps v -p $(cat ${PIDFILE}) | grep "ssh" |grep "[:]localhost[:]" |grep "${REMOTE_HOST}" > /dev/null ;
63 then
65 fi
68 #we get security+speed+efficiency using ssh-hpn+compression :-)
74 fi
