UNPKG

394 BJavaScriptView Raw
1import daemon from 'springbokjs-daemon';
2
3export default ({ host, localPort = 22, portOnServer = 9022 }) =>
4 daemon({
5 autoRestart: true,
6 command: 'ssh',
7 args: [
8 '-i',
9 '/root/.ssh/pooliot-server',
10 '-o',
11 'ServerAliveInterval 30',
12 '-o',
13 'ServerAliveCountMax 3',
14 '-NR',
15 `${portOnServer}:localhost:${localPort}`,
16 host,
17 ],
18 });