.TH SSH-DIFF "1" "March 2024" "SSH-TOOLS" "User Commands" .SH NAME ssh-diff .SH SYNOPSIS ssh\-diff [OPTIONS] FILE [user@]hostname[:FILE] .SH DESCRIPTION diff a file over SSH .P There is an extra roundtrip to the remote system .br to check for the existence of the file to be diffed. .br So if you are not using SSH Keys .br you may get prompted twice for a password. .P Use "CHECK_REMOTE_FILE_EXISTS=NO ssh\-diff" to disable that behavior .SH DIFF_OPTIONS All options your local diff command supports ( except '\-r' ). .br See 'man diff' and 'diff \fB\-\-help\fR' for more information. .SH SSH_OPTIONS .TP \fB\-4\fR Use IPv4 only .TP \fB\-6\fR Use IPv6 only .TP \fB\-p\fR port Port to connect to on the remote host. .br This can be specified on a per\-host basis in the configuration file. .SH ENVIRONMENT CHECK_REMOTE_FILE_EXISTS NO|YES remote file checking .SH EXAMPLES .TP # Default .TP ssh\-diff \fI\,/etc/hosts\/\fP 192.168.1.10 .TP ssh\-diff \fI\,/etc/hosts\/\fP root@192.168.1.10 .TP ssh\-diff \fI\,/etc/hosts\/\fP root@192.168.1.10:/etc/hosts.old .TP # Side\-by\-Side .TP ssh\-diff \fB\-y\fR \fI\,/etc/hosts\/\fP 192.168.1.10 .TP ssh\-diff \fB\-y\fR \fI\,/etc/hosts\/\fP root@192.168.1.10 .TP ssh\-diff \fB\-y\fR \fI\,/etc/hosts\/\fP root@192.168.1.10:/etc/hosts.old .TP # Unified .TP ssh\-diff \fB\-u\fR \fI\,/etc/hosts\/\fP 192.168.1.10 .TP ssh\-diff \fB\-u\fR \fI\,/etc/hosts\/\fP root@192.168.1.10 .TP ssh\-diff \fB\-u\fR \fI\,/etc/hosts\/\fP root@192.168.1.10:/etc/hosts.old