From 53e106a5970213209c251cf32f8b7c71aa3e8ba1 Mon Sep 17 00:00:00 2001 From: 12nick12 Date: Tue, 5 Jun 2018 16:06:42 -0400 Subject: [PATCH] Create start_systemd.sh --- host/start_systemd.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 host/start_systemd.sh diff --git a/host/start_systemd.sh b/host/start_systemd.sh new file mode 100644 index 0000000..fa1ead6 --- /dev/null +++ b/host/start_systemd.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +remoteport=$(sqlite3 /opt/sshjump/sshjump.db 'select port from sshjump') +localport=22 + +until ping -c1 google.com &>/dev/null; do :; done +autossh -N -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R $remoteport:localhost:$localport root@test.com -p 22333 -i /opt/sshjump/id_rsa