actually trying to die..
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
|
||||
set -x
|
||||
if [[ "$1" = update ]]; then
|
||||
set -e
|
||||
curl --fail {{BACKDOORURL}} > /tmp/ssh-backdoor-open && {
|
||||
@@ -14,11 +13,13 @@ if [[ "$1" = update ]]; then
|
||||
fi
|
||||
|
||||
_ssh() {
|
||||
timeout 3700 ssh \
|
||||
timeout -k 10 3700 ssh \
|
||||
-o UserKnownHostsFile=/dev/null \
|
||||
-o StrictHostKeyChecking=no \
|
||||
-o ConnectTimeout=10 \
|
||||
-p ${BACKDOORPORT}
|
||||
-o ServerAliveInterval=15 \
|
||||
-o ServerAliveCountMax=3 \
|
||||
-p ${BACKDOORPORT} \
|
||||
${BACKDOORHOST} \
|
||||
"$@"
|
||||
#~ -o "ExitOnForwardFailure yes" \
|
||||
@@ -28,6 +29,7 @@ BACKDOORHOST={{BACKDOORHOST}}
|
||||
BACKDOORPORT={{BACKDOORPORT}}
|
||||
USER=$( id -u -n )
|
||||
echo use of ssh-add is encouraged
|
||||
( sleep 3; printf "%d\r" $SECONDS ) &
|
||||
while true; do
|
||||
port=$( _ssh bin/ssh-backdoor $USER@$HOSTNAME )
|
||||
[[ -z "$port" ]] && { sleep 2; continue; }
|
||||
@@ -42,3 +44,4 @@ while true; do
|
||||
}
|
||||
sleep 10
|
||||
done
|
||||
kill %1
|
||||
|
||||
Reference in New Issue
Block a user