From 899e534019713d512478cc47f2182eb7f099e7de Mon Sep 17 00:00:00 2001 From: 12nick12 Date: Tue, 5 Jun 2018 16:48:51 -0400 Subject: [PATCH] Update start_systemd.sh --- host/start_systemd.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/host/start_systemd.sh b/host/start_systemd.sh index fa1ead6..a9801d9 100644 --- a/host/start_systemd.sh +++ b/host/start_systemd.sh @@ -1,7 +1,10 @@ #!/bin/bash -remoteport=$(sqlite3 /opt/sshjump/sshjump.db 'select port from sshjump') +dir=opt/sshjump +serverhost=user@test.test.com +serviceport=22333 +remoteport=$(sqlite3 $dir/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 +autossh -N -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R $remoteport:localhost:$localport $server -p $serverport -i $dir/id_rsa