Create reverse tunnel with autossh and systemd

By | December 6, 2019
  1. Install autossh with sudo apt install autossh
  2. Create autossh.service in /etc/systemd/system/ folder
  3. The content of autossh.service:
    1. [Unit]
      Description=AutoSSH service for a reverse tunnel from SERVER to localhost
      # start after DNS ready, but seems no difference with
  4. Execute sudo systemctl enable autossh.service
  5. Execute sudo systemctl start autossh.service

Hope it helps. 🙂