Update start.sh

This commit is contained in:
12nick12 2018-06-05 17:14:12 -04:00 committed by GitHub
parent 2c96dbc531
commit c847f44b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,10 @@
#!/bin/bash
servername=site.site.com
username=root
serverport=22
dir=/opt/sshjump
remoteport=$(sqlite3 $dir/sshjump.db 'select port from sshjump')
localport=22333
localport=22
autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R $remoteport:localhost:$localport root@remotehost.com -p 22333 -i $dir/id_rsa
autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R $remoteport:localhost:$localport $username@$servername -p $serverport -i $dir/id_rsa