Reverse-ssh.service
Jump to navigation
Jump to search
- Forward local port 22 to remote server port 5000
- Server is host.org with ssh port 1022
[Unit]
Description=AutoSSH tunnel service for ssh
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -N -R 5000:localhost:22 devnull@host.org -p 1022
[Install]
WantedBy=multi-user.target