Topic

SSH automation

SSH automation guides from Tryssh: practical diagnostics, safe operating procedures, and production runbooks for server operators.

rsync --partial vs --inplace: choose by recovery and reader behavior

--partial retains an incomplete temporary transfer for reuse, while --inplace writes directly into the destination file and changes atomicity, snapshots, and reader visibility.

The Tryssh team · July 29, 2026 →

Use SFTP batch mode with explicit failure and atomic-file behavior

Sftp -b reads commands from a file and aborts on selected command failures; remote application consistency and final-name publication remain separate concerns.

The Tryssh team · July 29, 2026 →

Use SSH BatchMode so automation fails instead of waiting for input

BatchMode disables interactive prompts, making missing credentials, host-key decisions, and keyboard-interactive requirements surface as bounded failures.

The Tryssh team · July 29, 2026 →

Use SSH Match exec without turning config into an opaque program

Match exec runs a local command while evaluating configuration and applies following options when it exits zero, so quoting, PATH, and evaluation order become part of connection behavior.

The Tryssh team · July 29, 2026 →

Use SSH ControlPersist in automation without stale shared masters

ControlMaster multiplexes channels over one authenticated transport, and ControlPersist can keep that master alive after the initiating client exits.

The Tryssh team · July 29, 2026 →

Use ExitOnForwardFailure so SSH tunnels fail loudly

ExitOnForwardFailure makes the client abandon setup when requested listening forwards cannot be established, but it does not prove the final destination behind a successful listener works.

The Tryssh team · July 29, 2026 →

Use ssh-keyscan for collection, never as automatic verification

Ssh-keyscan collects public host keys quickly without login, but it performs no authentication and therefore cannot establish that a returned key belongs to the intended host.

The Tryssh team · July 29, 2026 →

Automate SSH ProxyJump without placing private keys on the bastion

ProxyJump makes the client open a forwarding channel through the jump host; end-host authentication remains on the client and the bastion need not receive the private key.

The Tryssh team · July 29, 2026 →

ServerAliveInterval vs TCPKeepAlive for SSH connection liveness

ServerAlive messages travel inside the encrypted SSH channel and can bound an unresponsive peer, while TCPKeepAlive relies on operating-system TCP probes with different timing and spoofability.

The Tryssh team · July 29, 2026 →

Use StrictHostKeyChecking accept-new with a clear trust model

Accept-new adds previously unseen host keys but refuses changed keys; it reduces first-contact friction without authenticating who owns a new hostname.

The Tryssh team · July 29, 2026 →