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 [email protected]
UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHIBITED
You must have explicit, authorized permission to access or configure
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.
Last login: Thu Mar 19 07:56:09 2020 from 10.1.1.254
Cisco Nexus Operating System (NX-OS) Software
module-1# show clock
11:14:57.091 UTC Mon Mar 23 2020
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.