I need to get SSH banner from bunch of nodes from Cisco ACI. Let's name it as
ABC-ACI-APC-01 configured with IP Address
Let say there are 50 IP Addresses available in this ACI started from
I can SSH manually one by one like this to get the device's SSH banner. But this is not the best solution considering the number of devices that I have.
ABC-ACI-APC-01# ssh firstname.lastname@example.org ======================================================================= UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHIBITED You must have explicit, authorized permission to access or configure this device. Unauthorized attempts and actions to access or use this system may result in civil and/or criminal penalties. All activities performed on this device are logged and monitored. ======================================================================= Password: Last login: Thu Mar 19 07:56:09 2020 from 10.1.1.254 Cisco Nexus Operating System (NX-OS) Software XYZ_ACI_LEF_01# XYZ_ACI_LEF_01# vsh_lc vsh_lc_ro module-1# show clock 11:14:57.091 UTC Mon Mar 23 2020 module-1# module-1# exit XYZ_ACI_LEF_01#
SSH again, repeat the process.
Looking at the number of nodes, would it be possible to automate this?
Is there any sample script I can use and run it from Cisco ACI which is ABC-ACI-APC-01 in this case?
What I want to do is to read the IP list from file, let say ip.txt
Perform the SSH, get in, and run additional command which is vsh_lc, followed by show clock.
Then, exit and repeat the same process again.