Guest User

Untitled

a guest
Jan 16th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #/lib/systemd/system/autossh.service
  2.  
  3. [Unit]
  4. Description=Auto Reverse SSH
  5. Requires=systemd-networkd-wait-online.service
  6. After=systemd-networkd-wait-online.service
  7.  
  8. [Service]
  9. Type=forking
  10. ExecStart=/usr/bin/autossh -M 0 -f -N -R 2255:localhost:22 user@domain -g -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes
  11.  
  12. [Install]
  13. WantedBy=multi-user.target
  14.  
  15. sudo systemctl status autossh.service
  16.  
  17. ssh -R 2255:localhost:22 user@domain
  18.  
  19. /usr/bin/autossh -M 0 -f -N -R 2255:localhost:22 user@domain -g -o ServerAliveInterval=60 -o ServerAliveCountMax=3
Add Comment
Please, Sign In to add comment