Ssh redirect output local
From thelinuxwiki
to remotely execute an ssh command on a device and capture the output locally...
example:
ssh -l "$REMOTEUSER" "$REMOTEHOST" "/var/emhome/$REMOTEUSER/mem_info.sh;">>./tmp/$TMPFILE