SSH-DIFF(1)

πŸ“¦
version 1.10 Β· 3 versions
, in arch rolling, debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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. πŸ’œ
  • -p port β€” 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