Can't pipe into diff?
Try to use -
to represent the standard input.
ssh user@remote-host "cat path/file.name" | diff path/file.name -
Here's one workaround: diff
seems to accept <(expr) as arguemnts:
diff <(ssh \"cat path/file.name/") <(cat path/file.name)
Piping into diff is equivalent to running
diff path/file.name
and then, once it's running, typing the entire contents of the file.
As you can see, that's not what you expected.