2

Tip #536   Comparing local and remote files

Suppose we have to find the differences between local file "/tmp/localfile" and remote file "/tmp/remotefile" located on remote host 123.4.5.6

This is how can do it:
$ ssh user@123.4.5.6 "cat /tmp/remotefile" | diff - /tmp/localfile

And using vimdiff:
$ vimdiff scp://user@123.4.5.6//tmp/remotefile /tmp/localfile

(of course we would need ssh to work using public key authentication so that we can do remote commands execution without being prompted for passwords).