Ssh redirect output local

From thelinuxwiki
Revision as of 16:35, 12 April 2013 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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