server

client

1
#!/bin/bash
2
while true;do
3
RET=`ps ax | grep "ssh -f -N -R 10000:localhost:22" | grep -v "grep"`
4
if [ "$RET" = "" ]; then
5
echo "restart ssh server"
6
ssh -f -N -R 10000:localhost:22 lyb@hahalee.3322.org
7
fi
8
sleep 10
9
done
10

2

3

4

5

6

7

8

9

10
