In some case, putty command line can help us run remote command in this way:
Example
c:> putty.exe -ssh -2 -l username -pw password -m c:remote.cmd remote_host
c:> type c:remote.cmd
echo `date`;exit 0;
Note:
For full Putty command line options, check out "Putty User Manual" .
Hi,
May i know where should the command file remote.cmd be? is it reading from the remote terminal or the actual server that we putty into? i got error saying “cannot find command file”.
i want to execute a command say sar and generate the spool on txt file on local machine…please gudide.