From a2b35f94d5b91b55185a2cc849f978a681a956cf Mon Sep 17 00:00:00 2001 From: 12nick12 Date: Tue, 5 Jun 2018 15:22:49 -0400 Subject: [PATCH] Create start.sh --- start.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 start.sh diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..cdb0384 --- /dev/null +++ b/start.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +remoteport=$(sqlite3 /opt/sshjump/sshjump.db 'select port from sshjump') +localport=22333 + +autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R $remoteport:localhost:$localport root@remotehost.com -p 22333 -i /opt/sshjump/id_rsa