4

password problem when feeding a remote file into diff

view full story
linux-howto

http://unix.stackexchange.com – When I want to compare a local file with a remote file, any of these usually works: $ ssh remote cat file | diff file - $ diff file <(ssh remote cat file) However, sometimes (especially when the password is needed) they fail like this: $ ssh remote cat file | diff file - 1,162d0 < ... < ... Password: Here, diff doesn't wait for ssh to complete and considers the second file empty. It is only after diff is finished that ssh asks for the password, but it is too late. $ diff file <(ssh remote cat file) Password: Password: # asking again after a few seconds #&%Pasword (HowTos)