Thread: run ssh command
View Single Post
  #4  
Old 08-23-2017, 03:10 PM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi rleon,

It appears you are attempting to connect to a list of hosts and to run the uptime command on each, is that correct?

If so we may have a sample script you would be interested in.

It demonstrates how to connect to hosts read in from a "hosts" file and for each host, send a list of commands read in from a "commands" file. Results of each command run are (by default) logged to separate, uniquely-named files based on the host address and the command that is run. However, the script code is architected to allow you to change this behavior so that it's all logged to one file per host, or even just to a single file.
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote