💾 Archived View for freeshell.de › tldr › autossh.gmi captured on 2024-05-26 at 15:03:37. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
Run, monitor and restart SSH connections.
Auto-reconnects to keep port forwarding tunnels up. Accepts all `ssh` flags.
autossh -M {monitor_port} "{ssh_command}"
autossh -M {monitor_port} -L {local_port}:localhost:{remote_port} {user}@{host}
autossh -f -M {monitor_port} -N "{ssh_command}"
autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" "{ssh_command}"
autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -o ExitOnForwardFailure=yes -L {local_port}:localhost:{remote_port} {user}@{host}
AUTOSSH_DEBUG=1 AUTOSSH_LOGFILE={path/to/autossh_log_file.log} autossh -f -M {monitor_port} -v -E {path/to/ssh_log_file.log} {ssh_command}
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).