Create start.sh

This commit is contained in:
12nick12 2018-06-05 15:33:21 -04:00 committed by GitHub
parent 200ed58973
commit 965f640d4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

6
host/start.sh Normal file
View File

@ -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