Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch file on G350 G450 plink

Status
Not open for further replies.

donok

Technical User
Dec 1, 2004
41
IT
Hi,
is it possible to get from a list of G450/G350 the reading of the inside temperature, through a batch file?
I have tried to use plink without success, I have the following error:
FATAL ERROR: Server unexpectedly closed network connection

plink root@172.21.11.23 -pw password -ssh -v -m c:\command.txt >temp.txt
 
Not with a Batch file. The plink command runs a remote command file, not one local to your PC.
For example:
[tt]plink root@172.21.11.23 -pw password -ssh -v -m /bin/runthis.sh[/tt]
would run the [tt]runthis.sh[/tt] script on the remote device. Unfortunately, G450s do not work that way so you'll never get that to work.

You would be better off setting up an AutoHotKey script to log in, run the show temp command, and then copy it all to a text file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top