The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 09-01-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
The easiest way with plink would be to write a script on the remote server that does the query and sends the output to stdout. Then you can just run:

Code:
"C:\Program Files\PuTTY\plink.exe" @hostname /path/to/script > C:\Temp\Output.txt
You would need to set up a PuTTY session named 'hostname' with a private/public key pair so that no password was required to make the connection.