Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

ssh-diff - diff a file over SSH

Description

       diff a file over SSH

       There is an extra roundtrip to the remote system
       to check for the existence of the file to be diffed.
       So if you are not using SSH Keys
       you may get prompted twice for a password.

       Use "CHECK_REMOTE_FILE_EXISTS=NO ssh-diff" to disable that behavior

Diff_Options

       All options your local diff command supports ( except '-r' ).
       See 'man diff' and 'diff --help' for more information.

Environment

       CHECK_REMOTE_FILE_EXISTS    NO|YES    remote file checking

Examples

       # Default

       ssh-diff /etc/hosts 192.168.1.10

       ssh-diff /etc/hostsroot@192.168.1.10

       ssh-diff /etc/hostsroot@192.168.1.10:/etc/hosts.old

       # Side-by-Side

       ssh-diff -y/etc/hosts 192.168.1.10

       ssh-diff -y/etc/hostsroot@192.168.1.10

       ssh-diff -y/etc/hostsroot@192.168.1.10:/etc/hosts.old

       # Unified

       ssh-diff -u/etc/hosts 192.168.1.10

       ssh-diff -u/etc/hostsroot@192.168.1.10

       ssh-diff -u/etc/hostsroot@192.168.1.10:/etc/hosts.old

SSH-TOOLS                                          March 2024                                        SSH-DIFF(1)

Name

       ssh-diff - diff a file over SSH

Ssh_Options

-4     Use IPv4 only

       -6     Use IPv6 only

       -p port
              Port to connect to on the remote host.
              This can be specified on a per-host basis in the configuration file.

Synopsis

       ssh-diff [OPTIONS] FILE [user@]hostname[:FILE]

See Also