Update start_systemd.sh
This commit is contained in:
parent
8b73d1d738
commit
2af46c4b94
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue