Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:services:ssh:autossh [2018/03/04 07:40] – ↷ Page moved from docs:guide-user:services:autossh to docs:guide-user:services:ssh:autossh bobafetthotmail | docs:guide-user:services:ssh:autossh [2022/03/25 10:50] – [Run as Service] trendy | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| * [[https:// | * [[https:// | ||
| - | [[docs: | + | [[docs: |
| ===== Use Case ===== | ===== Use Case ===== | ||
| Line 28: | Line 28: | ||
| ===== Configuration ===== | ===== Configuration ===== | ||
| Autossh is configured using the [[docs: | Autossh is configured using the [[docs: | ||
| + | |||
| + | A typical confiugration is as follows: | ||
| + | < | ||
| + | config autossh | ||
| + | option ssh '-i / | ||
| + | option gatetime ' | ||
| + | option monitorport | ||
| + | option poll ' | ||
| + | option enabled | ||
| + | </ | ||
| + | |||
| + | You need to eplace ''/ | ||
| + | |||
| + | ===== Run as Service ===== | ||
| + | |||
| + | Autossh is often used as reverse proxy. It's probably because your ISP does not give you a public address or your router firewall policies. To make autossh run even when router restarts, your need to set up a service. | ||
| + | |||
| + | In ''/ | ||
| + | |||
| + | |||
| + | |||
| + | start_instance() { | ||
| + | local section=" | ||
| + | | ||
| + | config_get ssh " | ||
| + | config_get gatetime " | ||
| + | config_get monitorport " | ||
| + | config_get poll " | ||
| + | config_get_bool enabled " | ||
| + | | ||
| + | [ " | ||
| + | | ||
| + | procd_open_instance | ||
| + | procd_set_param command / | ||
| + | procd_set_param respawn ${respawn_threshold: | ||
| + | procd_set_param env AUTOSSH_GATETIME=" | ||
| + | procd_set_param env AUTOSSH_POLL=" | ||
| + | procd_set_param env HOME="/ | ||
| + | procd_close_instance | ||
| + | |||
| + | |||
| + | Now you can enable the service by ''/ | ||
| ===== Fixes ===== | ===== Fixes ===== | ||
| To get ssh working you need to replace '' | To get ssh working you need to replace '' | ||