I'd like to send the output the stdout of a ssh command in a file but this file remains empty when I read it.
# ssh -o "BatchMode=yes" -o "ConnectTimeout=5" [email protected] > /var/tmp/.result.txt
ssh: connect to host 10.10.10.10 port 22: Connection timed out
# cat /var/tmp/.result.txt
#
How to do so? Thanks.