autossh

Verified for current stable LTS

Autossh Commands

Autossh command syntax with verified terminal examples.

Commands

12 commands for Autossh

autossh

Autossh Command: Start Ssh Session Monitoring

autossh -M <monitor_port> "<ssh_command>"
autossh

Autossh Command: Fork Autossh Background No Shell

autossh -f -M <monitor_port> -N "<ssh_command>"
autossh

Autossh Command: Logging Autossh Output

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>
autossh

Autossh Command: Start Ssh Session

autossh -M <monitor_port> "<ssh_command>"
autossh

Autossh Command: Fork Background No Shell

autossh -f -M <monitor_port> -N "<ssh_command>"
autossh

Autossh Command: Background No Monitoring Keepalive

autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" "<ssh_command>"
autossh

Autossh Command: Background No Monitoring Exit On Failure

autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -o ExitOnForwardFailure=yes -L <local_port>:localhost:<remote_port> <user>@<host>
autossh

Autossh Command: Forward Local Port To Remote

autossh -M <monitor_port> -L <local_port>:localhost:<remote_port> <user>@<host>
autossh

Autossh Command: Background Ssh With Keep Alive

autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" "<ssh_command>"
autossh

Autossh Command: Background Ssh No Monitor No Shell

autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -o ExitOnForwardFailure=yes -L <local_port>:localhost:<remote_port> <user>@<host>
autossh

Autossh Command: Forward Local Port

autossh -M <monitor_port> -L <local_port>:localhost:<remote_port> <user>@<host>
autossh

Autossh Command: Background Debug Logging

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>

Suggest a Autossh Command

Submit missing workflows, corrections, or verified alternatives for this tool.

FAQ

Coverage: Focused examples for common Autossh workflows.

Verified version: current stable LTS.

Verification: Test commands in a disposable workspace and submit notes for edge cases.