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/08/18 04:02] – [Configuration] antiver | docs:guide-user:services:ssh:autossh [2022/03/25 10:50] – [Run as Service] trendy | ||
|---|---|---|---|
| Line 40: | Line 40: | ||
| You need to eplace ''/ | 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 '' | ||