Skip to content

Instantly share code, notes, and snippets.

@Gnnng
Created October 26, 2017 08:42
Show Gist options
  • Select an option

  • Save Gnnng/c8d3f8fe8264a62ab141df47759068c6 to your computer and use it in GitHub Desktop.

Select an option

Save Gnnng/c8d3f8fe8264a62ab141df47759068c6 to your computer and use it in GitHub Desktop.

Revisions

  1. Gnnng created this gist Oct 26, 2017.
    12 changes: 12 additions & 0 deletions autossh-template.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    [Unit]
    Description=autossh daemon for remote-server
    After=network.target

    [Service]
    User=gongdeli
    ExecStart=/usr/bin/autossh -NR 62222:localhost:2222 remote-server
    Restart=always
    RestartSec=10

    [Install]
    WantedBy=multi-user.target