Update start.sh
This commit is contained in:
parent
2c96dbc531
commit
c847f44b53
@ -1,7 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
servername=site.site.com
|
||||||
|
username=root
|
||||||
|
serverport=22
|
||||||
dir=/opt/sshjump
|
dir=/opt/sshjump
|
||||||
remoteport=$(sqlite3 $dir/sshjump.db 'select port from 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
|
||||||
|
Loading…
Reference in New Issue
Block a user