rsync Error: protocol version mismatch — is your shell clean?

Remote `.bashrc` printed banner text to stdout on non-interactive SSH login.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: rsync Error Platform: Linux
Common Root Causes:
  • Remote `.bashrc` printed banner text to stdout on non-interactive SSH login.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Guard interactive output in `~/.bashrc` with `[[ $- != *i* ]] && return`.
Safe Diagnostic Command:
ssh <host> true | od -c
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Remote `.bashrc` printed banner text to stdout on non-interactive SSH login. Recommended diagnostic: `ssh <host> true | od -c`. Remediation: Guard interactive output in `~/.bashrc` with `[[ $- != *i* ]] && return`.

Worked Examples

  • Run `ssh <host> true | od -c` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-linux-rsync-protocol-version-mismatch · Independently verified: 2026-11-25

Related Resources