Every time I configure a network in my virtual environment I have to manually:
- create a special folder for the project
- create each session (copy-paste)
- rename each session
- setup the logon actions on session properties
On SecureCRT website, I have found a useful article named Importing SecureCRT® Sessions from a Data File. This script creates simple sessions. It also gives me the possibility to define a logon script for each session. Therefore, I will create a script that takes the session name and use it as variable to introduce my first cli commands:
Unlike my technical articles about configurations, protocols and so on, in this tutorial I will explain how to log automatically all SecureCRT sessions. For those that are unaware, SecureCRT is one of the best SSH/telnet client. The question is “why save everything?” In my opinion, a good approach to work with many devices (network, security, ) is to save.
- Qualtrics loop and merge. The Qualtrics Loop & Merge utility is a powerful tool and offers great flexibility when dealing with dynamic content in a survey. I want to show off some use cases ranging from very simple to advanced, which you can adapt for use in research.
- A quick look on SecureCRT website confirmed that it supports scripting with Python, VBScript, Jscript and PerlScript. I’m familiar with Python so it is my choice. The idea is simple: connect to the remote device via telnet. Verify the radio bridge is up. Reload the device if radio bridge is down. The script with comments is quite.
Securecrt Vbscript
Next, I will take as an example the network created to Carrier-of-carriers setup created in a recent post.
My Carrier-of-carriers.csv file:
The modified Python script ImportArbitraryDataFromFileToSecureCRTSessions-Silvia-v1.0.py:
Securecrt Script Examples
- Main script and how to run the script: https://www.vandyke.com/support/tips/importsessions.html
- Other scripting examples to learn and inspire: https://www.vandyke.com/support/securecrt/python_examples.html
- A script that helped me to customize the existing one: https://www.vandyke.com/support/securecrt/scripts/SendCommandToTabs.py.txt