Skip to content

反向隧道建立shell

yourlovemyall edited this page Sep 1, 2017 · 1 revision

反向隧道建立shell

#!/bin/bash

RIP="*.*.*.*"
portlist=(34206 34207)
n=5670

for p in ${portlist[@]}
do
  echo $n
  echo $p
  autossh -M $n -f -NR $p:localhost:$p kediak@$RIP -i /opt/shell/kediak
  n=$[$n + 1]
done
Clone this wiki locally