Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-22-2021, 02:15 PM
codeblocker codeblocker is offline
Registered User
 
Join Date: Oct 2020
Posts: 2
Post Simple loop for ip-range and repeat a command? Please help!

hi fam,

I'm on a jump host. I now set the command "ssh 192.168.178.1 readscript -c> ~ / backupscript.txt". After that, anything can happen. Accept timeout, password, login, host key and so on. If all is well, the "Password:" query comes and my password should be used automatically. At this moment a "readscript" is sent to the 192.168.178.1 and written to the "backupscript.txt" file. I now need a loop that repeats this for a lot of devices and also catches errors like timeout. It would also be nice if the file name includes the name of the IP address or something similar. If there is a more elegant way of solving this via SFTP, I would be grateful for ideas. Unfortunately, I have no idea where exactly to start. If you still need information, just ask.

Thank you
Jack
Reply With Quote
 

Tags
jumphost , ssh , vbs scripting , vbscript securecrt


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:34 AM.