SSH-DIFF(1)
π SSH-DIFF π
okay bestie, gather round, because this is the manual page for ssh-diff β a lil user command that lives in section 1 of the manuals, and it's literally here to help you diff a file over SSH. yes. that's the whole vibe. π¦
β¨ NAME β¨
ssh-diff β diff a file over SSH π
πΈ SYNOPSIS πΈ
ssh-diff [OPTIONS] FILE [user@]hostname[:FILE]
π DESCRIPTION π
so basically: diff a file over SSH. that's it, that's the mission, no cap.
but lowkey there's a catch you need to know about. 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. twice!! the audacity π
if that's giving you the ick, you can turn it off:
CHECK_REMOTE_FILE_EXISTS=NO ssh-diff
use that to disable that behavior. slay. β¨
π DIFF_OPTIONS π
literally all options your local diff command supports β except '-r'. periodt, that one's not invited.
want the full list? go read man diff and diff --help for more information. iykyk. π
π SSH_OPTIONS π
-4β Use IPv4 only. four only, bestie. that's the whole personality. π-6β Use IPv6 only. six only, and honestly? iconic. π-pport β Port to connect to on the remote host. This can be specified on a per-host basis in the configuration file. so you can set it per-host if that's your thing π
π§ ENVIRONMENT π§
CHECK_REMOTE_FILE_EXISTSβNO|YESβ remote file checking πΈ
β EXAMPLES β
Default π«Ά
ssh-diff /etc/hosts 192.168.1.10
ssh-diff /etc/hosts root@192.168.1.10
ssh-diff /etc/hosts root@192.168.1.10:/etc/hosts.old
Side-by-Side π
ssh-diff -y /etc/hosts 192.168.1.10
ssh-diff -y /etc/hosts root@192.168.1.10
ssh-diff -y /etc/hosts root@192.168.1.10:/etc/hosts.old
Unified π₯
ssh-diff -u /etc/hosts 192.168.1.10
ssh-diff -u /etc/hosts root@192.168.1.10
ssh-diff -u /etc/hosts root@192.168.1.10:/etc/hosts.old
and that's the whole page, bestie. go forth and diff responsibly π
this lil masterpiece comes to you from the SSH-TOOLS crew, dated March 2024 β mwah, catch you in the next manpage πβ¨π¦
π¦ where this page comes from
- arch rolling: ssh-tools 1.10-1 Β· GPL-3.0-only
- debian trixie: ssh-tools 1.9-1+b6 Β· GPL-3.0-or-later
- ubuntu questing: ssh-tools 1.9-1
- ubuntu resolute: ssh-tools 1.9-1build1 Β· GPL-3.0-or-later
- ubuntu stonking: ssh-tools 1.9-2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms