2023年4月2日星期日

autossh exit when working background

 Try to add -N to your arguments.

autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -f -N -R :5678:127.0.0.1:5678 root@<server_ip>

Through a socks5 proxy

autossh -M 0 -o "ProxyCommand nc -x 127.0.0.1:7891 -X 5 %h %p" -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R :5678:127.0.0.1:5678 root@<server_ip>