How do diff over ssh?

You can do it with Bash’s process substitution:

 diff foo <(ssh myServer 'cat foo')

Or, if both are on remote servers:

diff <(ssh myServer1 'cat foo') <(ssh myServer2 'cat foo')

Leave a Comment