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-12-2013, 10:37 PM
foysol_bgd foysol_bgd is offline
Registered User
 
Join Date: Feb 2012
Posts: 5
Router/Switch/Firewall configuration retrieve Telnet and SSH

Hello Experts,

Would you please point me to right direction for a script.

1. Script will look for hostname in a text file.
2. Script will look for the commands in a text file.
3. Script will try Telnet first and if fail then it will SSH the device.
4. If a particular command fail then script will move to next command.
5.Output for each host will create a separate text file.
Reply With Quote
  #2  
Old 02-13-2013, 10:18 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi foysol_bgd,

The scripting manual is probably the best resource for learning how to use the SecureCRT Scripting API. Here is the location in case you don't have it:
http://www.vandyke.com/support/tips/...ing/index.html
Another good resource is the Scripting forum Script Examples sticky thread. Here is the location:
http://forums.vandyke.com/showthread.php?t=10365
The entry called Read Data From Separate Hosts/Commands File And Log To Individual Files is likely a good place to start as you write your script.

There are also various discussions in the Scripting forum about protocol fallback. Here is one in particular:
http://forums.vandyke.com/showthread.php?t=3433
Does this information help you get started writing your script?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 02-14-2013, 07:57 PM
foysol_bgd foysol_bgd is offline
Registered User
 
Join Date: Feb 2012
Posts: 5
Todd,

Thank you. I have loaded the script. Would you please have a look at the below and help me how to modify the script to meet my requirements.

1. The script needs to go to enable mode after log in to the devices. So that all the commands can be run. "enable" command after log in to devices and use the same password for telnet/ssh.

2. The script was able to telnet only and no SSH as a fallback option. I looked at your protocol fallback script and did not understand how to merge the two scripts together.

3. The scripts creating .txt file for each command. I want .txt file for each hosts/device.


You are talking with a dump guy here and it will take sometime for me to understand these scripts. Thanks for your help.
Reply With Quote
  #4  
Old 02-15-2013, 10:42 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi foysol_bgd,

We don't write custom scripts. You are welcome to modify the examples to meet your needs. If you do have a SecureCRT scripting API specific question, please post it and we can help answer it.

What specific problem are you encountering as you modify the script examples to meet your needs?
__________________
--Todd

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


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 02:10 AM.