08-22-2021 12:41 AM
we have many routers and i want to run a command like
clear crypto gdoi then yes
on a multi routers at once any ideas ?
08-22-2021 02:36 AM
- Here's an example tool (probably there are numerous other solutions too) :
http://anastarsha.com/use-parallel-ssh-to-run-commands-on-multiple-devices-at-the-same-time/
M.
08-22-2021 03:18 AM
link didn't work i want a tool or an idea to make it
08-22-2021 09:24 AM
At exactly the same time or just as quickly as you can cycle through all the routers?
Do you need resulting output of command?
Do you know ahead of time the command should be run, or is this we need to run it now?
Will command break any remote session connection?
08-24-2021 01:34 AM - edited 08-24-2021 01:36 AM
not important in the same time but i have 200 routers i want to run the command clear crypto gdoi then yes becouse the cisco ip phone some time not registered and i have to run this command on every single router to register ip phone and it waste the time i want a tool or idea to run this command specifically on all routers faster
08-24-2021 09:27 AM
Is there anything that can be "check" on the routers, themselves, that would show the need for this command? If so, perhaps an EEM script could self monitor and apply the command as needed.
If not, might be able to write an external program that access each router and applies the command. Execution could be sped in the controlling program can access multiple routers concurrently and/or doesn't need to wait on the results of the remotely executed command. (NB: in the past, I've written both PERL and Python scripts to make changes to hundreds of routers.)
Lastly, there might be some management application that could perform a role similar to what I just described, but if so, I'm not current on what's in the marketplace.
08-26-2021 02:59 AM
thanks for help and for your description i will search for a tool again
08-26-2021 06:11 AM
I have a ssh client python script posted on git hub. Access the script here: https://github.com/dafrey243/ssh_client
08-30-2021 05:41 AM - edited 08-30-2021 06:38 AM
how to run this script sorry it's the first time for Me in the programing field just give me the headlines and I will search for the way to do it .. thanks in advance.
08-30-2021 06:53 AM
Run the script by executing: python sshclient.py.
Here is an example with config_file.txt has contents:
enable
cisco
show clock
[dafrey@CrashCart functions]$ python sshclient.py
192.168.0.1
C1111>term len 0
C1111>enable
Password:
C1111#
show clock
13:39:07.796 UTC Mon Aug 30 2021
C1111#
C1111#
192.168.0.2
C3750X-G>term len 0
C3750X-G>enable
Password:
C3750X-G#
show clock
*13:17:38.212 UTC Fri Jun 4 1993
C3750X-G#
<truncate>
08-30-2021 07:18 AM - edited 08-30-2021 08:17 AM
where to locate the script? i locate it in a new folder on the desktop as the attached screenshot showing
08-30-2021 07:25 AM - edited 08-30-2021 07:39 AM
...
09-04-2021 02:39 AM
any answer please for my previous replay ??
09-04-2021 07:37 AM
This is from a linux system to run a script in python 2.7 interactive mode. I am not sure if this is the same for windows.
[dafrey@CrashCart ~]$ cd /biz/python/bin/functions/
[dafrey@CrashCart functions]$ ls -l sshclient.py
-rwxrwxrwx 1 root root 1233 Aug 30 09:34 sshclient.py
[dafrey@CrashCart functions]$ python
Python 2.7.5 (default, Nov 16 2020, 22:23:17)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> execfile('sshclient.py')
192.168.0.1
/usr/lib/python2.7/site-packages/paramiko/rsakey.py:119: CryptographyDeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
algorithm=hashes.SHA1(),
C1111>term len 0
C1111>enable
Password:
C1111#
09-22-2021 03:07 AM
hello Eng Daniel
i need the secrept with telnet not ssh
thanks in advance
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide