Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-22-2021, 03: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
  #2  
Old 02-22-2021, 04:12 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,548
Hi Jack,

We don't write custom scripts. However, I think this example in the script examples "sticky" might be helpful to you.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 02-23-2021, 09:41 AM
codeblocker codeblocker is offline
Registered User
 
Join Date: Oct 2020
Posts: 2
Ok, i think this script is for a newbie to much overpowered but i take a look at this and try my best...thanks in advance...for further questions to this script i will update this thread

regards from germany!!
Reply With Quote
Reply

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 03:18 PM.