Update start_systemd.sh

This commit is contained in:
12nick12 2018-06-06 06:53:35 -04:00 committed by GitHub
parent 8b73d1d738
commit 2af46c4b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,10 +1,11 @@
#!/bin/bash
dir=/opt/sshjump
serverhost=user@test.test.com
servername=user@test.test.com
usersname=sshjump
serviceport=22
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 $server -p $serverport -i $dir/id_rsa
autossh -N -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R $remoteport:localhost:$localport $username@$servername -p $serverport -i $dir/id_rsa